Need Help, Hard to describe......

Game Editor comments and discussion.

Need Help, Hard to describe......

Postby shahs94 » Thu Sep 20, 2007 1:06 am

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.
shahs94
 
Posts: 13
Joined: Sat Apr 21, 2007 11:15 pm
Score: 0 Give a positive score

Re: Need Help, Hard to describe......

Postby pixelpoop » Thu Sep 20, 2007 6:35 am

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
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Re: Need Help, Hard to describe......

Postby shahs94 » Thu Sep 20, 2007 8:55 pm

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.
shahs94
 
Posts: 13
Joined: Sat Apr 21, 2007 11:15 pm
Score: 0 Give a positive score

Re: Need Help, Hard to describe......

Postby pixelpoop » Fri Sep 21, 2007 6:21 am

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.
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron