if (get_sprite_with_this_brain(3, ¤t_sprite) == 0) { move(¤t_sprite, 280, y, 1); playsound(43, 22050,0,0,0); }
and it dosnt suproze me it dosnt work since i just started all this rubbish this week. what needs to be changed or added to make this work?
FF4LIFE
posted 07-17- 11:01 PM CT (US)
Hmmm, well, I think your problem is nothing triggers the action. I'm assuming your putting this under void main. You need to attach this to one of the targets. For instance, at the top of every targets script, put int &wall = sp(sprite number); Then, when you put void main, have a global &targets you put in MAIN.C go up one: &targets += 1; right under that put: if (&targets == 3) (If you have 3 targets) { move(&wall, 8, 300, 1); }
That sould do it.
Gerben
posted 07-18- 01:22 AM CT (US)
Or put the move command into the void die(void) bit of the target script. Now when the targets dies it executes the script. You need to make the target create the wall sprite by using create_sprite. All these commands can be found in the dinkc.txt file.