Page 2 of 2

Re: Weapons Selection

Posted: 22 Mar 2011, 14:33
by knorke
But when I run it only the animation runs, no bullet is fire and no damage done.
you must return from AimWeapon1 before the animation. (like in first line)
Yours work perfectly?
well, kind of. beside the problem that the unit does not "know" what weapon is active and thus does not move into range with different ranged weapon.

To make sure the CallCOBScript part works put an Echo in the COB (if thats possible) or use the Activate/Deactivate callins for testing with the on/off button.

Re: Weapons Selection

Posted: 23 Mar 2011, 04:39
by Von66341
Thanks lots!
I manage to have certain weapons on/off when I do not want to use.

However, the weapons will only be able to fire when we click the attack button correct?

Would it be possible to say when we click on for the weapon the weapon will fire? At the selected the target.
I was thinking along the line of using Spring.GiveOrderToUnit and insert the attack command. but am not sure how should I write the code.

Cause if on the command on, I insert the following code:
Spring.CallCOBScript(unitID,"FireWeapon1",0,0)
The unit does the firing action but do not fire any bullets or cause any damages.

Appreciate all the help! =)