- Joined
- Jan 13, 2008
- Messages
- 559
Why does the unit not get created? I use JNGP and don't receive any error while saving, so I guess the custom script is correct?
I have a grid of size 14x16 and want to spawn a unit at a random area in this grid but the unit doesn't appear.
I have a grid of size 14x16 and want to spawn a unit at a random area in this grid but the unit doesn't appear.
-
PlayerSpawn
-
Events
- Player - Player 1 (Red) types a chat message containing c as An exact match
- Conditions
-
Actions
- Set tempInteger = (Random integer number between 1 and 14)
- Game - Display to (All players) the text: (String(tempInteger))
- Set player_X[1] = ((Real(tempInteger)) x 2000.00)
- Set tempInteger = (Random integer number between 1 and 16)
- Game - Display to (All players) the text: (String(tempInteger))
- Set player_Y[1] = ((Real(tempInteger)) x 2000.00)
- Custom script: call CreateUnit(Player(0), 'htwo', udg_player_X[1],udg_player_Y[1], bj_UNIT_FACING )
-
Events