Spawning an entity
Spawning an entity
Hi ,
What is the correct solution to spawn an entity ? in the exemple i would like to spawn a deamon head on a wall with name "head1"
I know i have to enter the coordonates ,the height, the facing ... what else ?
spawn("daemon_head",14,19,-1,1,"head1")
Thx
What is the correct solution to spawn an entity ? in the exemple i would like to spawn a deamon head on a wall with name "head1"
I know i have to enter the coordonates ,the height, the facing ... what else ?
spawn("daemon_head",14,19,-1,1,"head1")
Thx
Re: Spawning an entity
and what is the order plz ?
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: Spawning an entity
Code: Select all
spawn("torch", 8, 15, 16, 1, 0,"DazUberTorch")
spawn("asset", X, Y, Facing, Elevation, "name")8 is the level, in the order that they are listed in your dungeon editor, the top most level being 1 and then going 2,3,4 as they descend down (don't mix this up with coordinates the tell the game how your levels and the minimap interact)
15 is the X
16 is the Y
1 is the facing (from 0 to 3 )
0 is the elevation
and then comes the name (and that's optional if you never need to call this again.)
Re: Spawning an entity
Super ! Thank you very much 
Re: Spawning an entity
Hey guys.
i have a question:). Its pretty the same but i just want to know how to let things "Despawn".
But for the editor Despawn is a nil value
.
Thanks
i have a question:). Its pretty the same but i just want to know how to let things "Despawn".
But for the editor Despawn is a nil value
Thanks
Re: Spawning an entity
Use Destroy(). In my example if i want to destroy my entity i use
head1:destroy()
for a monster , use kill()
head1:destroy()
for a monster , use kill()
Re: Spawning an entity
Instead of fiddling with the coordinates, an easier way is to use an existing entity as an anchor, like this:
Works with any entity.
Another trick is to use the script as the anchor:
Code: Select all
pressure_plate_1:spawn("bread")Another trick is to use the script as the anchor:
Code: Select all
self.go:spawn("bread")Re: Spawning an entity
oh that's great , thanks for this trick 
what "Anchor" can i use for a spawn on a wall ?
what "Anchor" can i use for a spawn on a wall ?