Unknown action: spawn


(sani) #1

I’m doing a practice map (practicing any random stuff), atm working on a constructable thing (ye haven’t learned that before).
When I’m trying to load the map, it gives an error:

The lines 121-124:

door_controls2
{
	spawn
	{

Full script here

No missing {} from the script or any typos in any actions.
Already asked few other mappers but didn’t got any real answers.


(Qualmi) #2

post your whole script please, then i can tell you 100% :slight_smile:


(Miki) #3

It probably has to do with the fact that the brush doesn’t exist ingame yet. Try to put

wait 5000

in front of it and try it out


(Qualmi) #4

miki should be right. but wait 300 should be enough :slight_smile:

to explain this and for future handling. put in every single spawn-block of your script the wait command, best at the beginning. this will prevent the engine from trying to initialize entities which not yet exist. waiting about 300 milliseconds should be enough for the engine and all your entities should be at place i think. take a look at the fueldump script f.i.


(sani) #5

Wait 300 or 5000 doesnt work.
No change.


(Qualmi) #6

forget what stands here :slight_smile:


(isbowhten) #7

there is a { missing.
in the scriptblock before the error-line

{ // this one
	playsound sound/movers/motors/motor_start_02.wav
	wait 200
	gotomarker dynadoor_left_path2 40
	playsound sound/movers/motors/motor_loop_02.wav wait
	wait 3000
	playsound sound/movers/motors/motor_end_02.wav wait
}

}

door_controls2
{


(Zer0Cool) #8

there is missing a “{” after “trigger close”

lol isbo du sau, 1 minute


(Qualmi) #9

lol, didnt saw that. i always tap in gay answers it seems XD


(sani) #10

Oh lol :smiley:
My bad, works now :slight_smile:
Thanks :o


(Miki) #11

does it work with, or without the wait?

edit :

Yes, I know, I had the same problem once, and I tried a low value, like 300 --> didn’t work
5000 did work… :stuck_out_tongue:


(isbowhten) #12

the wait in the spawn event …
dose not make sense in the way you wanted to use…
the entity itself has already spawned when the spawn event is executed.

if within the spawnevent would be something like “setstate x” then a wait has to be there cause “x” maybe did not spawn yet.

and the error usually is always above the error line :stuck_out_tongue:
cause ET first thinks you did all correct, so the missing { is in some kind “planned”.
then later it detects an error, but it cant say you where exactly and often it cant tell you why because it always stars thinking like “author planned it like he did it” and only later comes into trouble.


(Qualmi) #13

isbowhten, what do you mean with “dose not make sense in the way you wanted to use”.

the entity has already spawned when the spawn-blocks of the script are executed ? is this really like this ? or do you mean sth like putting in the game-manager a wait 1000000 and then all entities are there. you seem to know exactly what the engine does when initilazing the game, so could you pls explain in all detail :smiley:

edit:

No missing {} from the script or any typos in any actions.

thats the reason i failed -.-


(isbowhten) #14

ehm…

example:
some-entity //could be a constructible
{
spawn
{
wait 512 v // useless
some commands related ONLY to itself. e.g. accum 0 set 0 or whatever
or even: setstate “some-entity” (that is the entity itself) invisivle
attention: if you have more than 1 entity with that name then the command
would be related to itself AND to others…
}
}

anoter-entity // could be game_manager
{
spawn
{
wait 512 // important !
some commands that are NOT related to itself. e.g. setstate some-entity(not the entity itself) invisible
}
}


(Qualmi) #15

hm…sounds logic. ofc one could have programmed this better, but hey, its ok :slight_smile:

ill take now a look what the wait command really does and examine a bit the programmorder by implementing bugs on purpose :wink:


(Tyrlop) #16

i was just about to ask if you forgot spawn points. but lol… :smiley: