Well, on the target on mouse button actor I did this script:
- Code: Select all
if (ammo>0)
{
ChangeAnimation("horse1", "blackshot01", FORWARD);
ammo--;
}
else PlaySound2("C:\\Downloads\\Sounds fuer Flash Film und Themen\\Krieg-Waffen\\entsichern-klicj.wav", 1.000000, 1, 0.000000);
For mow, it play just only the empty-click sound. So I messed up with the variable. I create a globar integer named ammo, but I don't know how to set it at 7? I tried to double click on it on the list and wrote
ammo=7; But this don't work.
I'm a noob, I know.
Other ting: When ammo is available, it should do more than one action, can I pack it in the same code,
somerthinng like this:
- Code: Select all
if (ammo>0)
{
ChangeAnimation("horse1", "blackshot01", FORWARD);
score.textNumber = score.textNumber + 20;
PlaySound2("C:\\Downloads\\Sounds fuer Flash Film und Themen\\Krieg-Waffen\\schuss.wav", 1.000000, 1, 0.000000);
StopSound=(gallop1)
ammo--;
}
else PlaySound2("C:\\Downloads\\Sounds fuer Flash Film und Themen\\Krieg-Waffen\\entsichern-klicj.wav", 1.000000, 1, 0.000000);
Would this be the right syntax? Or do I have to make braces after each command?