Page 1 of 2

Blocking spawns revisited...

Posted: Sun Oct 09, 2005 3:46 am
by G3mInI
Hi scripters,

Been a while since I been here, but after looking at various scripts here and there I have a new question about blocking the original spawns in the stock maps. Is it possible that by simply spawning an invisible trigger, that it will effectively block a spawn? How bout spawning a dummy.tik ? Will that block a spawn? You see currently I have been spawning things like crates and/or the little wooden bucket to block the spawns, but if there is something invisible that I could use, well of course then I would much rather do that.

Let me know what you think of this. I actually have this thought from rindogs spawn blocker script for mam files. In his script is contained this....

Code: Select all

spawn_block_trigger local.origin:
 local.trig = spawn trigger_multiple
 local.trig.origin = local.origin
 local.trig setsize ( -4 -4 -4 ) ( 4 4 4 )
 local.trig wait 0.2
 local.trig delay 0.0
 local.trig setthread global/global_spawn.scr::spawn_block_trigger_thread
 local.trig.dummy = spawn fx/dummy.tik
 local.trig.dummy.origin = local.origin
 local.trig.dummy setsize ( -1 -1 -1 ) ( 1 1 1 )
 local.trig.dummy solid

end

spawn_block_trigger_thread:
local.player = parm.other
self.dummy notsolid
while (local.player istouching self)
{
// println test
 wait .1
}
wait 1
//println endtest
self.dummy solid
end
Now as I see it this is just using a trigger and a dummy to block the spawns. Not sure on why to make solid though, would the player not hit it?

G3mInI

Posted: Sun Oct 09, 2005 4:48 am
by bdbodger
The trigger is just to make the fx/dummy.tik not solid so that players in the game do not run into a solid model . The fx/dummy.tik is a non drawing model so it works the same as your crates and/or the little wooden bucket only you can't see it .

spawn

Posted: Sun Oct 09, 2005 4:57 am
by tltrude
local.clip = spawn script_object
local.clip.origin = local.origin
local.clip setsize ( -4 -4 -4 ) ( 4 4 4 )

Do you want to block the area or remove the spawn spots? You can just remove a whole "class" of objects.

Posted: Sun Oct 09, 2005 5:58 am
by G3mInI
This is to change the orginal spawns in the stock maps. What I have done is make each dm map obj. They work ok, its just that i have crates and/or buckets all over the place where the original dm spawn points were. What I do is block the spawns, and then spawn axis on one side of the map, and allies on the other. I have tried using the removeclass command but have not been successful with for the stock dm maps. People were still spawning in some of the original spots. All I'm looking for is a way to block those originals without using crates and buckets. And from reading bdbodger's reply, it seems as though this actually does work, yes?

Only thing is, I hate using loops in my scripts. Especially those checking for players constantly, I mean I know there is the loop for the obj and teamwin, but it just seems to me, the fewer, the better, as far as lag is concerned. Maybe that statement does not hold water, I'm not sure. Just really looking for a nice clean way to block those original spawns without having to use a loop. Can I just spawn dummy.tik's at the original locations and make them notsolid ?

G3mInI

Posted: Sun Oct 09, 2005 7:16 am
by bdbodger
Trying to remove spawnpoints with removeclass does not work as far as I know . Makeing the fx/dummy.tik notsolid I think won't work but you can try it . I am sure if it did work ringdog would have done it .

Posted: Sun Oct 09, 2005 9:58 am
by G3mInI
I am sure if it did work ringdog would have done it .
That's kind of what I was thinking too. Another question then, can you block the spawns say with a crate or something, spawn the players where I would like them to spawn as I do now, but then go and remove the all the crates when the players spawn in these new spawn locations?

Like maybe after level waittill roundstart, if I were to give each blocking crate or bucket a targetname and then remove each one of them, would that work? Just throwing out some ideas here. I don't really mean to drag this thread out, but the thought just struck me while I was responding.

G3mInI

Posted: Sun Oct 09, 2005 10:22 am
by bdbodger
I don't see where you are going with this but of course if you add a model with a target name you can remove it at any time do you really need someone to answer that for you :) also don't forget if your new spawnpoints have targetnames you can use disablespawn and enablespawn to turn them on and off .

remove

Posted: Sun Oct 09, 2005 11:15 am
by tltrude
Yeah, I don't get it either. Placing a model on a spawn spot will just cause the players to get stuck when they spawn there. If you add these line before you script the new spawns, they will remove all the original spawns.

removeclass info_player_axis
removeclass info_player_allied

Re: Blocking spawns revisited...

Posted: Sun Oct 09, 2005 2:57 pm
by GiffE1118
G3mInI wrote:Hi scripters,

Been a while since I been here, but after looking at various scripts here and there I have a new question about blocking the original spawns in the stock maps. Is it possible that by simply spawning an invisible trigger, that it will effectively block a spawn? How bout spawning a dummy.tik ? Will that block a spawn? You see currently I have been spawning things like crates and/or the little wooden bucket to block the spawns, but if there is something invisible that I could use, well of course then I would much rather do that.

Let me know what you think of this. I actually have this thought from rindogs spawn blocker script for mam files. In his script is contained this....

Code: Select all

spawn_block_trigger local.origin:
 local.trig = spawn trigger_multiple
 local.trig.origin = local.origin
 local.trig setsize ( -4 -4 -4 ) ( 4 4 4 )
 local.trig wait 0.2
 local.trig delay 0.0
 local.trig setthread global/global_spawn.scr::spawn_block_trigger_thread
 local.trig.dummy = spawn fx/dummy.tik
 local.trig.dummy.origin = local.origin
 local.trig.dummy setsize ( -1 -1 -1 ) ( 1 1 1 )
 local.trig.dummy solid

end

spawn_block_trigger_thread:
local.player = parm.other
self.dummy notsolid
while (local.player istouching self)
{
// println test
 wait .1
}
wait 1
//println endtest
self.dummy solid
end
Now as I see it this is just using a trigger and a dummy to block the spawns. Not sure on why to make solid though, would the player not hit it?

G3mInI
I use ringdogs thing (the script you posted) to block spawns spawning little crates or other objects get in the way that makes it solid right as the player spawns on it and solid things block spawns. After its not touched its notsolid again so ppl dont bump into it.

It is the best way, IMO, but you will have to give him a little credit his idea and script.

andyou said invisible trigger...triggers are always invisible they arent a model. it uses dummy bucause its invisible.

that spawn blocking thing, i thinl, was part of his spawn popper, which has been around for a while.

Posted: Sun Oct 09, 2005 7:42 pm
by ViPER
No, you cant remove class spawns (any) via script.

If you spawn a solid object in spawn coord then you will effectively block the spawn and players will spawn in your newly scripted spawn.

If you block all the spawns with out scripting new ones- player may spawn at 000 or moh will crash when player is activated.

I have tried to block spawns with rindogs trigger but it never worked for me - I cant see in his script that he actually utilizes this portion to simply block spawns but rather to reverse the usage of them.

I have also tried using portions of the Hunt spawns fix mod to tele players to new location but players tend to spawn together and get stuck if there are many players.



you can hide the solid object but it will still block player movement.


here are some examples of spawn blocking and switching

http://dynamic.gamespy.com/~map/mohaa/f ... 5742#85742

http://dynamic.gamespy.com/~map/mohaa/f ... 5569#85569

Posted: Mon Oct 10, 2005 3:02 am
by G3mInI
Thank you Viper, finally someone understands where I am at. And yes all that you stated is absolutely correct. I was just trying to see if there was a way to block spawns with a model, and then remove them when the round starts, thereby cleaning up the map without having those crates and/or buckets everywhere.

For others, as Viper has stated, when you spawn a model in a spawns orginal origin, moh will not spawn a player there because the space is occupied, just as when you play a tdm map, you wont spawn in an area if a player is standing in the orginal spawn spot, because that player is effectively blocking the spawn. So moh will pick another dm spawn point which is not blocked. When you block all original spawns, and script in new ones, then moh will be forced to pick one of your newly scripted spawn locations because all the 'original' spawn locations are being blocked.

What I am after if it is possible, is to block these spawns, force the moh engine to pick one of my newly scripted spawn locations, and then remove my 'blocking objects' before the round begins, all this happening without the players actually even seeing the blocking objects.

Did I mention that is for a server-side scripting mod?

G3mInI

G3mInI

Posted: Mon Oct 10, 2005 4:24 am
by ViPER
hmmm. I dont think that will work as the spawns are allways there and when you remove the blocking model the engine will still look at those spawns.

But as bdBodger said you can give the blocks a targetname and remove them and replace them all you like and whenever you like.

However you can hide the blocking model as i said earlier but it will still block players movement.

maybe try other models like lamposts or furniture.

Posted: Mon Oct 10, 2005 6:57 am
by bdbodger
Thats right as soon as you remove the model the spawn point is useable again it only works if you have a model there at all times . I still think ringdogs idea is the only way to do it so players don't know there is a spawnpoint there at all . The trigger makes the model notsolid just while the player is in the spawnpoint as soon as he leaves it becomes solid again and blocks spawns again .

Posted: Mon Oct 10, 2005 7:24 am
by ViPER
i hate to beat this to death - but i have not been able to get Rindogs trigger idea to work for spawn blocking. If someone has please let me know.

bdBodgers explanation of how it is suppose to work has helped me understand it more. I will have to play with that method somemore.

Posted: Mon Oct 10, 2005 7:58 am
by G3mInI
Ok bdbodger I am following you on this. Now let me throw this in. In our server in particular we only run roundbased, thereby the spawns only come into question at the very beginning of a round, and are only looked at again by the engine at the start of the next round. Am I correct so far? So with that said, lets say I block them, then script them all before level waittill prespawn, then after level waittill spawn I remove the blocking models, does this seem logical? What I mean is, will it work each and every round until the fraglimit is reached say 7 rounds which is what ours is set at?

I can see where this would not work at all for tdm or ffa, but we don't play those variations and haven't for 3 years now. It's strictly an obj server playing roundbased, that is why I modded the dm maps server side for more obj play, without players needing the map. The four obj stock maps tend to get a bit old with time playing them over and over day after day for years. I eventually plan on moving into the single player maps as well but of course that requires a lot more work, to make them multiplayer sound. I'm not just talking about the spawns, but more so the glitches such as falling under the map and going behind untextured walls or on top of untextured roofs, etc..

G3mInI