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/0603:4706/25/0603:47
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/0609:0006/25/0609:00
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