AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Moving Spawns (https://forums.alliedmods.net/showthread.php?t=2634)

Zor 06-11-2004 20:02

Moving Spawns
 
What I want to do is to move spawns around. This is a DoD plugin Im thinking about, what it will do is check to see if lets say center flag is held? If so by whom? Then move the spawn point forward for that side so they can defend better, and it gives ppl the incentive to get moving and take that center flag, Im also thinking that if no one from that team has entered the flag zone within a certain amount of time it begins to uncapture...or just turns neutral...well any help would be appreciated! Cheers!

pendragon 06-11-2004 20:11

wow - sounds like a good idea, can that be done though? I thought that kind of stuff was like embedded in the map and couldnt be altered or else you had a new map. if it can be done via a plugin/module... that would be kool cause then you would open the doors for a more dynamic game.
THen again, I guess it can be done because I know for a fact that the llama cage plugin sets a new respawn point for the appointed llama and untill an admin remove's that llama's punishment, the llama keeps respawning in that spot.

a foreseable problem though would be giving the new respawn points coordinates to the module, plugin... maybe this can be done in a .ini form or some kind of alterable form where an admin can set the new respawn point for his team either in game or via spectator mode.

Zor 06-11-2004 22:05

Thats the idea...its kinda like stripper2. You can strip out an entity. The entity for a spawn point is info_player_allies and info_player_alxis with an origin. So you go in and determine where you want the spawn points for a given map in this format in the ini file:
"-2710", "800", "100"
etc
etc
etc

Then name that dod_tallgrass.ini or some such and put those files in lets say addons/amxx/custom/maps/
Now you can add or delete such tell it which flag to switch it on etc! Oh btw flags are dod_control_point so we look at the entities for the map and see which points are where etc....I just need to figure out which functions to use for getting entities deleting them and making new ones on the fly...anyway!

Cheers!
BTW here is a list of plugins I use on my server if any interest you email or pm me:

myplugins/admin_ff.amx ; Shows ppl that FF is on
myplugins/amx_password.amx ; Turns the password off and on
myplugins/amx_pig.amx ; Will pig shit heads, and unpig them
myplugins/amx_practice.amx ; Starts a practice for the bw clan
myplugins/amx_quit.amx ; Will boot asses to windows
myplugins/dod_teamselect.amx ; Will switch ppl over to the other team
myplugins/high_ping_kicker.amx ; Duh...
myplugins/amx_alltalk.amx ; Enables Disables Alltalk
myplugins/dod_limits.amx ; Adds limiting for DoD
myplugins/adminmodx.amx ; Adds Adminmod stuff to the AmxModX
myplugins/tk.amx ; First version of tk manager
myplugins/hitzones.amx ; Allow for hits in only certain places
myplugins/clan_tag_protection.amx ; Will protect our clan tags
myplugins/tracker.amx ; Tracks People for future Use
myplugins/dod_deathmsg.amx ; Puts up a death message about killer
myplugins/amx_publicwar.amx ; Public War

QwertyAccess 06-11-2004 22:08

you just have to change the entity's origin, should work fine on dod.

Zor 06-11-2004 22:14

And how do you get the entity in the first place? And Im thinking that would be easy...save the old ones in a temp file, then move the origins, then once it reverts to that other state you reset them....or put em all in the file....

"Axis", "", ""
"x", "y", "z", "start"
"x", "y", "z", "start"
"x", "y", "z", "start"
"x", "y", "z", "new"
"x", "y", "z", "new"
"x", "y", "z", "new"
"Alies", "", ""
"x", "y", "z", "start"
"x", "y", "z", "start"
"x", "y", "z", "start"
"x", "y", "z", "new"
"x", "y", "z", "new"
"x", "y", "z", "new"

Or something like that or have a temp file with it in it...anyway...
Cheers!

BAILOPAN 06-12-2004 00:42

CSDM does this, I hate just responding to threads with a stupid plug, but look at the spawn reading and moving code. It may help you

SidLuke 06-12-2004 07:05

Quote:

Originally Posted by Zor
Oh btw flags are dod_control_point so we look at the entities for the map and see which points are where etc....I just need to figure out which functions to use for getting entities deleting them and making new ones on the fly...anyway!

Long time ago (Jun 24 2003!) there was an amx module called dodbasic. With it you were able to change flag owner , points for capture etc. But this project died :?

Zor 06-12-2004 09:58

Hey Sid you have the code for dodBasic? As all I can find is the so, and want to see if it can be updated.

Cheers!

PS Will look at csdm.

KilledWithStyle 06-18-2004 16:49

EntMod will also do this

Zor 06-26-2004 11:31

Ok so I been doing research into this. Lets say I wanted to find the following entity:

{
"origin" "1056 -1952 -268"
"angles" "0 90 0"
"classname" "info_player_allies"
}

How would I go about it? So I use the following?
new ent = find_ent_by_class(0, "info_player_allies")

The thing is that there can be up to 32 of these? So what I want to do is find the entity by origin maybe? Once I have that entity then I want to delete it:
remove_entity(ent)

Now could I instead of delete it change the origin of it?
entity_set_origin(ent, {1000, 1551, -268})

Because I use stripper2 on my servers I'm use to locating entities from an ent map that I get by using ripent app. So if this is the way to go about it I guess it will be easy to move the spawns from one place to another making the big maps more fun for less ppl. Like dod_caen, huge ass map. But as a team gets a flag 2 flags away from their spawn their spawn is moved up by 1 flag lets say. The map I'm really thinking about starting this for is dod_tallgrass, when a team gets the center flag, their spawn is moved forward to flag 2. Kinda like they did in dod_zafod back when. Ok if there are any problems give me a shout plz, that way I dont spend a whole shit load of time doing nothing.

Cheers!


All times are GMT -4. The time now is 14:49.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.