Can't get addDroid function to work

For AI and campaign script related discussions and questions
Post Reply
User avatar
Terminator
Regular
Regular
Posts: 1067
Joined: 05 Aug 2006, 13:46
Location: Ukraine
Contact:

Can't get addDroid function to work

Post by Terminator » 07 May 2010, 15:47

Code: Select all

addDroid(tmpl[0][12], 20, 20, 0);
this line doesn't want to work correct. Units always place on 0,0 coords (in the top left corner)(seems like off map), and they always stuck there, when trying to move them - they blow Ups. but some of them could get out of there after gliching moves.

stderr

Code: Select all

error   |04:49:27: [moveUpdateDroidPos] droid trying to move off the map!
error   |04:49:27: [moveUpdateDroidPos] Assert in Warzone: ../../../src/move.c:2182 (psDroid->droidType == DROID_TRANSPORTER), last script event: 'N/A'
error   |04:49:27: [removeDroidFX] CHECK_DROID: Droid off map
error   |04:49:27: [removeDroidFX] Assert in Warzone: ../../../src/droid.c:500 (droidOnMap(droid)), last script event: 'N/A'
error   |04:49:27: [removeDroidBase] CHECK_DROID: Droid off map
error   |04:49:27: [removeDroidBase] Assert in Warzone: ../../../src/droid.c:385 (droidOnMap(droid)), last script event: 'N/A'
error   |04:49:27: [removeDroidBase] Asking other players to destroy droid driving off the map
error   |04:49:27: [removeDroidBase] Assert in Warzone: ../../../src/droid.c:400 (droidOnMap(psDel)), last script event: 'N/A'
error   |04:49:27: [moveUpdateDroid] Mini-Rocket Array Cobra Half-tracks moved off map (0, 9)->(0, 9)
error   |04:49:27: [moveUpdateDroid] Assert in Warzone: ../../../src/move.c:3347 (droidOnMap(psDroid)), last script event: 'N/A'
error   |04:49:27: [moveUpdateDroid] CHECK_DROID: Droid off map
error   |04:49:27: [moveUpdateDroid] Assert in Warzone: ../../../src/move.c:3348 (droidOnMap(droid)), last script event: 'N/A'
error   |04:49:27: [droidUpdateRecoil] CHECK_DROID: Droid off map
error   |04:49:27: [droidUpdateRecoil] Assert in Warzone: ../../../src/droid.c:1614 (droidOnMap(droid)), last script event: 'N/A'
error   |04:49:27: [droidUpdateRecoil] CHECK_DROID: Droid off map
error   |04:49:27: [droidUpdateRecoil] Assert in Warzone: ../../../src/droid.c:1676 (droidOnMap(droid)), last script event: 'N/A'
error   |04:49:27: [droidUpdate] CHECK_DROID: Droid off map
error   |04:49:27: [droidUpdate] Assert in Warzone: ../../../src/droid.c:986 (droidOnMap(droid)), last script event: 'N/A'
error   |04:49:27: [droidUpdate] CHECK_DROID: Droid off map
error   |04:49:27: [droidUpdate] Assert in Warzone: ../../../src/droid.c:811 (droidOnMap(droid)), last script event: 'N/A'
error   |04:49:27: [actionUpdateDroid] CHECK_DROID: Droid off map
error   |04:49:27: [actionUpdateDroid] Assert in Warzone: ../../../src/action.c:1002 (droidOnMap(droid)), last script event: 'N/A'
error   |04:49:27: [actionUpdateDroid] CHECK_DROID: Droid off map
error   |04:49:27: [actionUpdateDroid] Assert in Warzone: ../../../src/action.c:2554 (droidOnMap(droid)), last script event: 'N/A'
error   |04:49:27: [moveUpdateDroid] CHECK_DROID: Droid off map
Death is the only way out... sh*t Happens !

Russian-speaking Social network Group http://vk.com/warzone2100

Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3775
Joined: 03 Aug 2006, 19:39

Re: Can't get addDroid function to work

Post by Per » 07 May 2010, 20:04

Try multiplying your x,y coordinates with 128 to make them world coordinates rather than map (tile) coordinates.

User avatar
Terminator
Regular
Regular
Posts: 1067
Joined: 05 Aug 2006, 13:46
Location: Ukraine
Contact:

Re: Can't get addDroid function to work

Post by Terminator » 08 May 2010, 12:01

You right =) its works. tnx
Death is the only way out... sh*t Happens !

Russian-speaking Social network Group http://vk.com/warzone2100

Post Reply