skill

Status
Not open for further replies.
Level 5
Joined
Jul 17, 2013
Messages
90
how to make a skill which charges with items I mean.. I want to make a marine with an amunition clips skill which charges by clicking on founding amunition items. For Example the skill limit will be 15 on lvl 1 and 30 on lvl 3 after amunition ends you cant shoot. and a second question how can I make units who cant move?
 
Level 18
Joined
May 11, 2012
Messages
2,108
Use integers to keep track of amunition. When your unit attacks, do integer -1, and check if it's 0. If it is, order it to stop attack.
Make an Int[] (array) and set Int[1] (Level 1) = 15, Int[3] (Level 3) = 30 etc..
Units can't move if their movespeed is set to 0, so there you go for unmovable units.
 
Use integers to keep track of amunition. When your unit attacks, do integer -1, and check if it's 0. If it is, order it to stop attack.
Make an Int[] (array) and set Int[1] (Level 1) = 15, Int[3] (Level 3) = 30 etc..
Units can't move if their movespeed is set to 0, so there you go for unmovable units.

Units can move if their movement speed is 0.

To stop them from moving you need to use this.
  • Set tempUnit = Triggering unit
  • Custom script: call SetUnitPropWindow( udg_tempUnit, 0.00)
The above will allow units to turn but will not allow them to move.
If you want to allow them to move again you need to get the prop window of the unit before setting it to 0 and store that in a variable.
Then you need to set the prop window of the unit to the value you have saved.
 
Level 18
Joined
May 11, 2012
Messages
2,108
Units can move if their movement speed is 0.

To stop them from moving you need to use this.
  • Set tempUnit = Triggering unit
  • Custom script: call SetUnitPropWindow( udg_tempUnit, 0.00)
The above will allow units to turn but will not allow them to move.
If you want to allow them to move again you need to get the prop window of the unit before setting it to 0 and store that in a variable.
Then you need to set the prop window of the unit to the value you have saved.

Thanks for correcting me.
 
Status
Not open for further replies.
Top