Jump to content
Sign in to follow this  
mrtbk

PSP (Player Spawn Point)

Recommended Posts

Hi everyone, i am currently working on an A&D map and am trying to figure out how to make a PSP (Player Spawn Point) that can be captured by any side and depending on which side controls this point, any member of that team can choose to respawn that the PSP or at their main base.

for a team to capture the PSP i would like to make it so that a member of the team has to go to the flag and select "take control" or something like that. also i would like to have several PSPs in the map.

i have no idea where to start or how to do any of this so any help solving any part of this would be greatly appreciated

thank you for any input you can provide

Mr-T*BK*

Share this post


Link to post
Share on other sites

Have seen it done, reliably, only using a single spawn point, somewhere 'off' the map on a little island someplace, and a trigger covering the spawn area. That then will pop-up a full-screen cover + dialog from a script that then asks where the player wishes to spawn, using the marker names as the data against the listbox content names. The script then uses a setPos to move the player to the chosen marker's position.

Hope that points you in a workable direction.

Share this post


Link to post
Share on other sites

Any ideas where you saw this i had a little look around and the only place thing i can find is a script for 4 spawn points but couldn't modify it to work without the flag and how to change it (rephrase that couldn't attempt to modify it to work)

any way thx [WWS]WarWolf

and as i said before help with any of the section will be greatly appreciated

Mr-T*BK*

Share this post


Link to post
Share on other sites

OK thx [WWS]WarWolf I found a multi point respawn and modified it to work for both teams i just need to know how to add a action when a player is next to a flag and get the flag to change if any one has any ideas where i can find this info i would be very greatful

Mr-T*BK*

Share this post


Link to post
Share on other sites

Care to share where and what you found? Im also looking for something like this.

Share this post


Link to post
Share on other sites

ye no problem hedcrusha sry i should have mentioned i found this link

http://www.armaholic.com/page.php?id=1502

i have modified to so both teams have separate multiple spawn points, if you would like the modified version let me know i will send it to you, if you would like to wait till i get it full working i will let you know when i finish (if i can finish it)

Mr-T*BK*

Share this post


Link to post
Share on other sites

Theres such facilities inside of Zaphod's Berzerk maps, and in ArMoGaDoN's AAS maps that I can think of from the top of my head - Zaphod's are inspirational, ArMoGaDoN's are simpler to follow, but both versions' code will need to be re-formatted onto separate lines manually to make it easier to trace through the code. I know that the AAS maps will be available as templates soon, so you'll be able to base your own maps on the templates so the hardest work will be already done...

Share this post


Link to post
Share on other sites

ok i have a problem i got all the code done but i am having a problem with one thing i have created a array of arrays

so basically the array looks

bases = [["Only Flag", "m_Spawn1", "none"]];

you get the idea, ok the problem i have is that i am basically change in the 3 part of each array element to which ever side controls the flag, the problem i am having is access the array from client computers (works fine on the host)

i have a flag which when a team get close to it and its not theres the get an action take point which executes some code which changes a variable to true and make it public

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">westflag = true;

publicVariable "westflag";

then have a trigger to run a script that changes the array

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (!local server) exitWith {};

westflag = false;

publicVariable "westflag";

sleep 0.5;

player globalchat "capping flag (EAST)";

player removeAction flag1;

bases set [0, ["Only Flag", "m_Spawn1", "East"]];

point1 setFlagTexture "\ca\misc\data\sever_vlajka.paa";

f1 = 2;

publicVariable "f1";

publicVariable "bases";

if you need any more info just let me know

and any suggestion would be greatly appreciated

Mr-T*BK*

Share this post


Link to post
Share on other sites

ok i discovered that arrays cannot be made public banghead.gif

anyway i found away around that problem but a new problem came up when an person who is not the host take the point the flag changes for them then instantly changes back. i know why this happens but do not know how to solve it,

i need a way to call a script and get it to run on every client computer that changes the flag, i know i can do this with a trigger but as far as i am aware i would need a trigger for each psp, which in the future could cause some problems

could any one tell me how to get the script to run on every clients machine or so pass variable to a trigger

Share this post


Link to post
Share on other sites

Either detect the 'score of point' on the server, do a publicVariable of a boolean var. to echo that down to the clients who catch the changed var in a trigger, or if you want the client to detect, then that will need to throw a publicVariable up to the server, which catches and re-transmits another different publicVariable back down to the clients.

Read up on the publicVariable command - from client to server only goes to the server (not other clients), but publicVariable from server goes to all clients.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×