Page 1 of 1
Need Help, Hard to describe......

Posted:
Thu Sep 20, 2007 1:06 am
by shahs94
I need to find a way to make it so that when a person gets shot (the bullet collides with the other person), an object moves a little to the left.
This is probably very easy for all you amazing game makers, so if you can PLEASE HELP ME.
Re: Need Help, Hard to describe......

Posted:
Thu Sep 20, 2007 6:35 am
by pixelpoop
set up a script that executes when the collision event of the bullet hits the person. In the script put: actorsname.x-=1;
Putting the actors name followed by what you want to change allows you to control another actor from any script.
examples:
actorsname.r=1; //this changes the red value of the actor
actorsname.yvelocity=3; //changes the yvelocity for the specified actor
yvelocity=3; //this changes the yvelocity for the actor that the script is on.
hope this all helped
Re: Need Help, Hard to describe......

Posted:
Thu Sep 20, 2007 8:55 pm
by shahs94
ya it did, thanks.
I have a new question now...
im wondering how to make it so that for the time (AND ONLY FOR THE TIME) that an object is touching another object, a certain key doesnt work.
Re: Need Help, Hard to describe......

Posted:
Fri Sep 21, 2007 6:21 am
by pixelpoop
I don't know if you can disable a key or not but, you don't need to if you are using scripts. Make a global variable called something like, touching . On the collision event in script editor write touching=1; and add a collision finish script that says: touching=0;
Now on your key down event use this:
if (touching==1){
//insert your code here for the when touching event }
That is only one way to do it. I think you can also test for the collision in the key down script but this seems easier.