a retrieval type obj for mohaa
Moderator: Moderators
a retrieval type obj for mohaa
i would like to have it so the allies have to steal documents and get back in the boat and once there in the boat - objective achieved.. all i have so far is the docs tut from rhujkan project in my script, can anyone be of assistance on accomplishing this obj?
script
If you want help, you have to give all the facts, or at least post your script.
It could probably be done with a trigger_multiple on the boat with a targetname of "win_check_trigger" or something like that. That trigger would have a key: setthread and Value: win_check . The thread in the script would then check to see if the documents had been picked up and give the command "teamwin allies".
Another thing to think about is, what happens to the documents, if the guy carrying them gets killed before reaching the boat?
It could probably be done with a trigger_multiple on the boat with a targetname of "win_check_trigger" or something like that. That trigger would have a key: setthread and Value: win_check . The thread in the script would then check to see if the documents had been picked up and give the command "teamwin allies".
Another thing to think about is, what happens to the documents, if the guy carrying them gets killed before reaching the boat?
for an alternative objective to my liberation map I am goign to do something like this.
I think I will be placeing some documents or something similar on a corpse in one of the cells. When the allies get the objective, they must bring it back to the exit, where there will be a trigger multiple checking for it. It will attach to the player carrying it, like flags in some ctf matches(or identify them in some other way not sure yet. Since respawning will be on, I will have a timer on axis players holding the obj once they retrieve it(returning it to its origin) but no timer(or a very long one, on how long it can stay on the ground if the player is killed and drops it, so that allies do not have to brak into the most defensible portion of the map everytime the carrier is killed.
Alot of scripting for stuff like this is in CTF maps, or in CTF mods(like mefy's) you should check those out for ideas on players carrying and moving objects, as well as scoring and moving the object in cases of death or whatever. Basicaly CTF is jsut the most common version of what you are trying to accomplish, but usualy the object is a flag, and each team has one =)
I think I will be placeing some documents or something similar on a corpse in one of the cells. When the allies get the objective, they must bring it back to the exit, where there will be a trigger multiple checking for it. It will attach to the player carrying it, like flags in some ctf matches(or identify them in some other way not sure yet. Since respawning will be on, I will have a timer on axis players holding the obj once they retrieve it(returning it to its origin) but no timer(or a very long one, on how long it can stay on the ground if the player is killed and drops it, so that allies do not have to brak into the most defensible portion of the map everytime the carrier is killed.
Alot of scripting for stuff like this is in CTF maps, or in CTF mods(like mefy's) you should check those out for ideas on players carrying and moving objects, as well as scoring and moving the object in cases of death or whatever. Basicaly CTF is jsut the most common version of what you are trying to accomplish, but usualy the object is a flag, and each team has one =)
When I am king, you will be first against the wall~


-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
keeping it simple, i haven't read the script for it but if you want to have to take them back you'll need a little extra, have two triggers the first one trigger_use targetname/documents_trigger and the second trigger_multiple targetname/win_check
main:
$documents_trigger glue $documents
thread taking
thread did_we_win
end
taking:
$documents_trigger waittill trigger
parm.other.holder = 1
$documents_trigger nottriggerable
$documents hide
$documents glue parm.other
while (isAlive parm.other)
{
waitframe
}
$documents droptofloor
parm.other.holder = 0
$documents_trigger triggerable
$documents show
goto taking
did_we_win:
$wincheck waittill trigger
if (parm.other.holder == 1)
{
teamwin allies
end
}
else
{
wait 1
goto did_we_win
main:
$documents_trigger glue $documents
thread taking
thread did_we_win
end
taking:
$documents_trigger waittill trigger
parm.other.holder = 1
$documents_trigger nottriggerable
$documents hide
$documents glue parm.other
while (isAlive parm.other)
{
waitframe
}
$documents droptofloor
parm.other.holder = 0
$documents_trigger triggerable
$documents show
goto taking
did_we_win:
$wincheck waittill trigger
if (parm.other.holder == 1)
{
teamwin allies
end
}
else
{
wait 1
goto did_we_win
hope this helps, prob not cos it's all foreign 2 me :-/
crash
Well that will crash because nuggets forgot a bracket at the end. It is also not very fair for the axis team because they can't tell which allied player has the documents. I don't think you can glue a hidden document to a player, anyway. But, the basic concept is all there.
- Axion
- Major General
- Posts: 683
- Joined: Mon Sep 29, 2003 5:14 am
- Location: Northern California
- Contact:
Here is part of the script from the objective version of Palermo, where the Axis have to read a map and make it back to base in order to win-
Maybe that will give you some ideas...
Code: Select all
//*** --------------------------------------------
//*** This player has to run home to win
//*** --------------------------------------------
view_map local.player:
if ( local.player.dmteam != "axis" ) {
end
}
if ( ! (local.player cansee $map 60 80) ) {
end
}
if ( local.player.seenMap == 1 ) {
local.player iprint ( loc_convert_string "You've memorized the map! Run the back to the headquarters!!!" )
// local.player iprint ( loc_convert_string ( local.player.netname + " has already memorized the map!!!" ) )
end
}
local.player thread run_home_to_win
end
setCompass:
for (local.i = 1; local.i <= $player.size; local.i++)
{
if ( ! (Isalive $player[local.i] ) )
continue
if ( $player[local.i].dmteam != "axis" )
continue
if ( $player[local.i].seenMap != 1 )
continue
set_objective_pos $AxisHQ[1]
end
}
set_objective_pos $map
end
run_home_to_win:
self.seenMap = 1
set_objective_pos $AxisHQ[1]
iprintln ( loc_convert_string ( self.netname + " has a copy of the Allies map!" ) )
self iprint ( loc_convert_string "You've memorized the map! Run the back to the headquarters!!!" )
while ( self != NULL )
{
if ( ! (Isalive self) )
{
iprintln ( loc_convert_string "The Axis spy has been killed!" )
self.seenMap = 0
thread setCompass
end
}
if ( self.dmteam != "axis" )
{
iprintln ( loc_convert_string "Axis spy has defected!" )
self.seenMap = 0
thread setCompass
end
}
for (local.i = 1; local.i <= $AxisHQ.size; local.i++) {
if ( self isinside $AxisHQ[local.i] )
{
iprintln ( loc_convert_string "The Axis has won!" )
thread AxisVictory
end
}
}
wait 0.1
}
iprintln ( loc_convert_string "The Axis spy has vanished!" )
end
//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------
AxisVictory:
teamwin axis
end
axis_win_bomb:
level waittill axiswin
end
//*** --------------------------------------------
//*** "Allied Victory"
//*** --------------------------------------------
allied_win_timer:
level waittill allieswin
end
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

sorry for the vagueness but i didnt have any of this obj scripted so thats why i didnt post script i just was wondering if this kind of obj was possible
my idea was to have allies steal the documents and have to return them to the boat to win, knowing who has the docs would be cool but im unsure if thats even possible and if the person with the docs gets killed id like it so theyd return to where they were... im gonna give your guys suggestions a try, im a novice at best so any help would be very appreciated.. thanx
my idea was to have allies steal the documents and have to return them to the boat to win, knowing who has the docs would be cool but im unsure if thats even possible and if the person with the docs gets killed id like it so theyd return to where they were... im gonna give your guys suggestions a try, im a novice at best so any help would be very appreciated.. thanx
Re: crash
wheres the bracket missing at?tltrude wrote:Well that will crash because nuggets forgot a bracket at the end. It is also not very fair for the axis team because they can't tell which allied player has the documents. I don't think you can glue a hidden document to a player, anyway. But, the basic concept is all there.
did_we_win:
$wincheck waittill trigger
if (parm.other.holder == 1)
{
teamwin allies
end
}
else
{
wait 1
goto did_we_win
should be
Code: Select all
did_we_win:
$wincheck waittill trigger
if (parm.other.holder == 1)
{
teamwin allies
end
}
else
{
wait 1
goto did_we_win
}When I am king, you will be first against the wall~


-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
nuggets wrote:keeping it simple, i haven't read the script for it but if you want to have to take them back you'll need a little extra, have two triggers the first one trigger_use targetname/documents_trigger and the second trigger_multiple targetname/win_check
main:
$documents_trigger glue $documents
thread taking
thread did_we_win
end
taking:
$documents_trigger waittill trigger
parm.other.holder = 1
$documents_trigger nottriggerable
$documents hide
$documents glue parm.other
while (isAlive parm.other)
{
waitframe
}
$documents droptofloor
parm.other.holder = 0
$documents_trigger triggerable
$documents show
goto taking
did_we_win:
$wincheck waittill trigger
if (parm.other.holder == 1)
{
teamwin allies
end
}
else
{
wait 1
goto did_we_win
}
hope this helps, prob not cos it's all foreign 2 me :-/
nuggets, finally got it to work...
couple things... if u dont get out of the room in a sec round ends (we only got to further test it by kill in console right after grabbing.. which is another thing.. u die u keep docs
), axis can grab it, if u press use on the docs on the person's foot round ends... if u could please help me further with this scripting would be very much appreciated as im a noob with this scripting stuff 
couple things... if u dont get out of the room in a sec round ends (we only got to further test it by kill in console right after grabbing.. which is another thing.. u die u keep docs
