phrogz 10 Posted August 24, 2009 (edited) Hello, My first post on this forum, be nice with me :D ! I have a Base respawn type in my Description.ext, and a respawn_west marker. Respawn work like a charm, but how to disable it ingame (after an event, trigger...) ??? I've tried to delete the marker "respawn_west", wich result of an "instant respawn". It's very frustrating :mad::mad::mad: Regards. P.S. I've searched on the biki and the forum... Edited August 24, 2009 by phrogz Share this post Link to post Share on other sites
kylania 568 Posted August 24, 2009 Welcome to the forums! Can you describe why you want to remove the ability to respawn after X event? That might help give us some idea of how to do what you're trying to do. Share this post Link to post Share on other sites
xtriaden 10 Posted August 24, 2009 Do not think you can change the respawn after it has been set in the Description.ext (but I might be wrong). So as Kylania said if you give ppl more of an idea of what you what to do this for, someone might know a work-a-round for it. eg (after an event, trigger...) you might just make it end game the next time someone Dies. Share this post Link to post Share on other sites
phrogz 10 Posted August 24, 2009 (edited) Okay, I will explain a little more :) 1/ first part of the mission, I don't want to use respawn. 2/ second part: MHQ is moved to a location wich focus the "respawn_west" to the MHQ, after that I want to use respawn. 3/ last part I want to completly remove the respawn, or respawn as a bird... I hope to be clear :crazy_o: Edited August 24, 2009 by phrogz Share this post Link to post Share on other sites
kylania 568 Posted August 24, 2009 Personally I'd do this as a campaign, three seperate missions really. Since as Xtriaden said, you can't change the type of respawn mid-mission like that. That said, you could probably get around this via some tricky usage of eventhandlers. Start the mission with respawn enabled and tied to the MHQ. However start your player with an eventhandler KILLED that runs a forceEnd command to end the mission. Once they are at the second stage remove the EventHandler and let respawn work normally. For the third stage, probably just readd the EventHandler again? Share this post Link to post Share on other sites
phrogz 10 Posted August 24, 2009 Thx for the aswers, but I dont want to end the mission if someone die :j: Maybe something like: Trigger Name "NoRespawn" activated by: none type: none repeating condition: (!alive player) AND !spawn onActivation: player selectPlayer bird onDeactivation: or one thing like that.... :butbut: Share this post Link to post Share on other sites
daimyo21 2 Posted January 31, 2011 I wonder if this is possible too. As I want to be able to disable spawn as well mid mission. I was thinking maybe to annoyingly loop kill someone until it is enabled again but thats just bad gameplay. Share this post Link to post Share on other sites
galzohar 31 Posted January 31, 2011 Just move the respawn_west marker into some sort of a "prison" at some far away point on the map. Of course when you move it again, players in the "prison" will be able to click "respawn" in their menu and thus spawn back to the MHQ (once the marker is moved away from the "prison"), though most people are not aware this option even exists, therefore you should probably either teleport them automatically as soon as the MHQ is available, or give them a flag or something with an action that teleports them to the MHQ once that is available. Share this post Link to post Share on other sites
Tankbuster 1747 Posted January 31, 2011 In one of the recent patches, it's possible to change the respawn time. Perhaps your trigger could change the respawn time to a very long time, essentially infinity. Share this post Link to post Share on other sites
daimyo21 2 Posted January 31, 2011 prison idea sounds like a good idea.. or maybe a medical center.. I just feel like the player will be board to shit eventually and Id need to add shit to do in this medical prison. Share this post Link to post Share on other sites
f2k sel 164 Posted February 1, 2011 With MP the problem is keeping track of the player, you need to identify which player has died. eg. place in game logic named teleport lives = 1 cond !alive player on act lives=lives+1;if (lives == 3) then {call { [] spawn { waitUntil {alive player};hint "Teleport";player setpos getpos teleport}}}; That would work for single play, although it only counts deaths and on your third death moves you to a new loaction, I suspect in MP it will count all the players deaths and after 3 teleport all of them. Share this post Link to post Share on other sites
celery 8 Posted February 1, 2011 With MP the problem is keeping track of the player, you need to identify which player has died. Actually the player command refers only to the local player on each client, so effects will always be local. Share this post Link to post Share on other sites
daimyo21 2 Posted February 1, 2011 With MP the problem is keeping track of the player, you need to identify which player has died.eg. place in game logic named teleport lives = 1 cond !alive player on act lives=lives+1;if (lives == 3) then {call { [] spawn { waitUntil {alive player};hint "Teleport";player setpos getpos teleport}}}; That would work for single play, although it only counts deaths and on your third death moves you to a new loaction, I suspect in MP it will count all the players deaths and after 3 teleport all of them. I think itd work better if you named each individual playable unit. !alive player can apply to all players if in a trigger. I guess just to be safe. Though ive found when using playerscore < -1 for Team Killing etc. itd do it locally because itd detect right away whos score hits -1 than activates. Share this post Link to post Share on other sites
celery 8 Posted February 1, 2011 I think itd work better if you named each individual playable unit. !alive player can apply to all players if in a trigger. That's not how the player command works. It refers to the player unit on the local machine only. It's perfectly MP friendly to use player if the conditions are local, which the lives variable is to each client. Share this post Link to post Share on other sites
f2k sel 164 Posted February 1, 2011 It still wouldn't work though as lives would be global, you would have to have it scripted with each player having his own variable to keep count. Share this post Link to post Share on other sites
galzohar 31 Posted February 1, 2011 Global variables are only "global" on the machine that defined them, unless broadcasted with the publicVariable command. Share this post Link to post Share on other sites
daimyo21 2 Posted February 2, 2011 Im running a dedicated for demo (i have real game too just enjoy being creative for newbs). Demo doesnt support scripts locally so im doing all this on triggers essentially. with that said, read below. Ok so after alot of testing, Celery was right. "Player" does stay local. Heres some potential problems ive found though. Let me explain what im using: Gamelogic named "Teleport" init: lives = 0; Trigger: !alive player; Activation: lives=lives+1;if (lives == 3) then {call { [] spawn { waitUntil {alive player};hint "Your out of lives";player setpos getpos teleport}}}; This works perfect. Player is sent to gamelogic which is a prison essentially. Now only problem is when a player dies twice and has 1 last life. He can abort, go to lobby and rejoin and start at 3 lives again (once he figures this out). (if AI is disabled, player who rejoins starts at original spot where AI first spawned on map). So i want to leave AI on. I was trying this: Gamelogic: init: v1joins = 0; Trigger Condition: !Isplayer v1; (v1 being the unit name) Activation: v1joins=v1joins+1;if (v1joins == 2) then {call { [] spawn { waitUntil {alive v1};hint "v1 is now disabled";v1 setpos getpos teleport}}}; Im a very copy/paste/modify novice coder. Im not looking to start a career but I understand the jist of how it all works and I go to wikis etc. With the demo being restrictive against client ran scripts. I have to figure out how to restrict a player from rejoining and gaining his lives back through triggers or sending the AI to prison when too many joins occur. Any Ideas? Ill make a new post if needed. Share this post Link to post Share on other sites