Weapons Selection - Page 2

Weapons Selection

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Weapons Selection

Post 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.
Von66341
Posts: 111
Joined: 10 Feb 2011, 03:00

Re: Weapons Selection

Post 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! =)
Post Reply

Return to “Game Development”