Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Ayumi), 662 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How do you properly use ent_create command? #79257
06/25/06 00:49
06/25/06 00:49
Joined: Feb 2004
Posts: 71
Milky Way Galaxy...
JoeMama Offline OP
Junior Member
JoeMama  Offline OP
Junior Member

Joined: Feb 2004
Posts: 71
Milky Way Galaxy...
I am trying to make it so that on key press h, an entity named KT appears at the origin of the map with the script called troop attached to it. I have looked it up in the manual and found that it is
ent_create (STRING* filename, VECTOR* position, function);
so I created the lines of code at the end of my main fuction like so:
on_h=ent_create (KT.mdl, 0,0,0, troop.wdl);
but it gives me an error saying too many parameters. I have a feeling I am misunderstanding the VECTOR position and function parts of the code.

Re: How do you properly use ent_create command? [Re: JoeMama] #79258
06/25/06 03:47
06/25/06 03:47
Joined: Feb 2005
Posts: 3,687
Hessen, Germany
T
Tempelbauer Offline
Expert
Tempelbauer  Offline
Expert
T

Joined: Feb 2005
Posts: 3,687
Hessen, Germany
you canīt assign parameters by the on_-commands!
you have to write a function, who calls the ent_create:

Code:

function create_something()
{
ent_create (KT.mdl, 0,0,0, troop.wdl);
}

on_h = create_something();



Re: How do you properly use ent_create command? [Re: Tempelbauer] #79259
06/25/06 07:11
06/25/06 07:11
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
well not quite correct the code, you gotta write the vector either into a vector(x,y,z) or, caus you're creating at 0,0,0 the nullvector should work too, not certain though.
Oh and by the way you can only assign ACTIONS to entitys not the whole .wdl file !!
Code:

function create_something()
{
ent_create("KT.mdl",vector(0,0,0),troop_act);
}

on_h = create_something;



Re: How do you properly use ent_create command? [Re: Xarthor] #79260
06/25/06 09:00
06/25/06 09:00
Joined: Jun 2006
Posts: 86
Asia
xboy360 Offline
Junior Member
xboy360  Offline
Junior Member

Joined: Jun 2006
Posts: 86
Asia
wow! now this i can use! thanks all!

now that last parameter,the troop_act, that
would be the action of the created entity right??
oke..
I saw that tech demo of a6, and on that dynamic lights room,
there were these 2 girls who takes turns catching a ball.
how did they do that?? I am trying to make a basketball game


Happy Birthday!

Gamestudio download | chip programmers | 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