Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Quad), 3,790 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
apply an action to an entity after it has been created #261267
04/16/09 15:57
04/16/09 15:57
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
How can I apply an action to an entity after ent_create?
I mean it like here:
Code:
ent_create("bullet.mdl",my.x, NULL);
wait(1);
set(my, PASSABLE);
my.pan = temp_pan;
my.tilt = temp_tilt;
my.action = fly; // this doesn't work, but how must it be written!?



Thanks for reading, thinking, answering wink
Re: apply an action to an entity after it has been created [Re: Toryno] #261269
04/16/09 16:03
04/16/09 16:03
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
ent_create("bullet.mdl",my.x, NULL);

instead of NULL, you write your actions name.


3333333333
Re: apply an action to an entity after it has been created [Re: Quad] #261274
04/16/09 16:13
04/16/09 16:13
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
my problem is that every bullet can have another speed. i don't know how to make this, i don't want to make a new action for every speed wink

Last edited by Toryno; 04/16/09 16:14.

Thanks for reading, thinking, answering wink
Re: apply an action to an entity after it has been created [Re: Toryno] #261277
04/16/09 16:23
04/16/09 16:23
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
Ah i found an other way ;D


Thanks for reading, thinking, answering wink
Re: apply an action to an entity after it has been created [Re: Toryno] #261745
04/19/09 21:01
04/19/09 21:01
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline
Junior Member
DiegoFloor  Offline
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
Quote:
Ah i found an other way ;D


Wich is..? smile

I would really like to be able to pass some parameters with the action, like a function, when creating entities.

Re: apply an action to an entity after it has been created [Re: DiegoFloor] #261749
04/19/09 21:42
04/19/09 21:42
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Probably such a way:

Define _bullet_speed, skill99;

action bullet()
{
ent_move(...my._bullet_speed....)
}

function shooting()
{
you = ent_create(..., bullet)//This is the important part where you get the pointer to the created entity
you._bullet_speed = 20;
....


Last edited by Pappenheimer; 04/19/09 21:45.

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1