Page 2 of 2

PostPosted: Sun Aug 05, 2007 8:11 pm
by Troodon
Ah yeah, I forgot the bullet stops when it reaches the location where the actor2 is. So you need another code but I'm too tired to remember what code it exactly was.
Directions are controlled with the "angle" value. So the code will be in the create actor code but it will be something like

angle = //I dont' know this one now;
directional_velocity = 1;

PostPosted: Sun Aug 05, 2007 8:16 pm
by Zehper48
thanks tekdino, does anybody know the code for it?? thanks

PostPosted: Sun Aug 05, 2007 8:19 pm
by d-soldier
So your trying to make the bullet be like a heat-seeker? Where it adjusts it's velocity to compensate for a moving target???

PostPosted: Sun Aug 05, 2007 8:22 pm
by Troodon
Nooo, the opposite.

EDIT: He wants the opposite. That's why the code is in create actor in my example.

PostPosted: Sun Aug 05, 2007 8:23 pm
by Zehper48
not heat seeking the velocity doesnt have to be changing but it needs to move to an actor but not follow it

PostPosted: Sun Aug 05, 2007 8:47 pm
by d-soldier
If you are using move-to, then it is going to change it's direction as the target actor moves (heat-seeking like)...
What's wrong with: [CREATE-ACTOR]

angle = direction(x, y, target.x, target.y);
directional_velocity = 25;

PostPosted: Sun Aug 05, 2007 8:49 pm
by Zehper48
if you use move to with draw actor it will keep following it but if you use create actor it will move to were the actor was and stop, it wont continue moving thank you d-soldier for the code

also is there a code to make actor1 create actor2 when actor3 is within 500 units of actor1?

PostPosted: Mon Aug 06, 2007 5:54 am
by pixelpoop
you can use the distance function in a draw actor script

if (distance(actor1.x, actor1.y, actor3.x, actor3.y)<500)CreateActor......

PostPosted: Mon Aug 06, 2007 10:35 am
by Zehper48
i made a code so when my guy has 0 health it would load lose.ged
Code: Select all
if (M1health.textNumber <=0)
{
DestroyActor("Event Actor");
LoadGame ( "lose.ged");

}

when his health is 0 the screen just goes black instead of loading lose.ged
does anybody know why?

PostPosted: Mon Aug 06, 2007 4:26 pm
by Troodon
Yeah, it's because it can't load other projects in the game mode. Or they should be in the same folder.
Replace the .ged with .exe and then make executable of all your ged files. Then it will work but only in the exe file. (The ready version)
Of course it can be whatever export file.
:)