Hello I use the following code in a .scr file which is located in the global folder. spawnspot: while (level.roundstart != 1) wait .5 local.player = parm.other local.player tele ( -2689.42 824.98 -63.88 ) wait .3 local.player face ( 7.82 -126.30 0.00 ) goto checkstatus end to execute the file I use : exec global/spawn_spot.scr::spawnspot Is it possible to add the tele and face coords with a variable to the exec line, so it can be used in other maps where the spawn point is in a different location, and I only have to write exec global/spawn_spot.scr::spawnspot "and here the new tele and face coords" Swagel
Yes it is possible to do , but no your script will not work with or without it. 1. What is level.roundstarted ? the script will wait for this to be 1 before continuing with the rest. 2. local.player = parm.other will result in NULL, because parm.other refers to the entity that last accessed the thread, which is NULL, because no entiites have touched it. So your tele and face commands will result in a error. 3. goto checkstatus ?? what is this for and what goes the checkstatus do What are you trying to achieve with this thread ? Maybe if we knew what you were trying to do it might make it easier to help. Anyway to answer your question , yes it is possible to add a origin and face command through the exec line like this . exec global/spawn_swap.scr::spawnswap ( -2689.42 824.98 -63.88 ) ( 7.82 -126.30 0.00 ) Then you will also have to change the script to look something like this Code: spawnspot local.origin local.face: //// <<< Have to add them to the thread label to assign them to a local variable to be used within the script while (level.roundstart != 1) wait .5 local.player = parm.other local.player tele local.origin ///// <<< local.origin is the 1st variable you added onto the exec line wait .3 local.player face local.face ///// <<< local.face is the 2nd goto checkstatus end
Yep, level.roundstarted is used to wait until the round has started. When i was just starting with mohaa there were maps where I spawned on locations that I didn't like, or in some maps on a place where i could not escape from. So i looked for a solution to override the spawnpoint. The only way in that time I could come up with was to bind a key on tele. I even wrote to Jeroen Vrijkorte (jv_map) to ask him if he knew a solution. He pointed me to Squadmaker to achieve this. That was not exactly what I was looking for. A short time after that my acer pc crashed, and i stopped with mohaa-scripting. A few weeks ago I decided to pick up mohaa-scripting again. And again I thought it would be nice to overwrite the original spawnpoint in the map, and thus to choose my own spawn spot. Then I thought, if I write while (level.roundstart != 1) the script would wait until the round actually starts, and then do a tele. And it worked. I also have to say that this is only for playing against bots on my computer. local.player = parm.other is used to refer to myself, if I omit this, the value like local.player nodamage doesn't work. I could also write $player nodamage and in the future, I'll probably use this more often. But the script spawn_spot.scr I wrote works perfectly, I just needed a way to get de coords from the exec line. I used your suggestion and it works perfectly. The thread checkstatus is used to check whether I'm still alive or not, and if I'm not, do a respawn (Saves also a left click to respawn). if (isAlive local.player) {goto checkstatus} else {... Thanks again Elephant1au for the help. Swagel