Page 1 of 1

stock objectives in sp map to mp doesnt work

Posted: Mon Apr 24, 2006 4:31 am
by WefeW
Hi, here is my problem:

I'm trying to convert m1l2a from sp to mp, but keeping as many of the objectives in the map so it will be like doing the sp mission in mp.

However, I'm no modding Jesus so whenever an axis player touches the explosives in the basement of the fort, it cant be picked up by the allies.

Its like its already been triggered without having been picked up.

Here is what I tried to do without any luck:

gotexplosives:
local.player = parm.other
if ( local.player.dmteam == "allies" )
{
$explosive hide
$player playsound pickup_explosives
waitthread global/items.scr::add_item "explosive"
thread clearused
thread lockup 600
thread lockdown 452

level.explosivecount = 20
level.flags[explosives] = 1

thread newobjective
}
end


I hope you guys can help me out.

Thnx

Tow

Posted: Mon Apr 24, 2006 4:52 am
by tltrude
You should study the original objective or tow scripts.

Posted: Mon Apr 24, 2006 5:00 am
by bdbodger
You shouldn't use things like $player playsound pickup_explosives since $player refers to every player in the game in mp .

Posted: Thu Apr 27, 2006 5:26 am
by WefeW
Hi, and thnx for your answers.

I have tried to do as you suggested, but the problem still remains.

Whenever an axis player tries to pick up the explosives it looks like it remains "untriggered" but afterwards the allies cant pick it up, so in some way it has been triggered.

If the allies gets to the explosives first , everything works fine.

As far as I know this only applies to "trigger_useonce", if it's a "trigger_use" there's no problem.

I wonder if it's even possible to use the stock "trigger_useonce" objectives in sp maps, or if you have to remove them and put your own triggers in instead, or if you can convert a stock trigger from "trigger_useonce" to "trigger_use"?

:?:

Posted: Thu Apr 27, 2006 5:34 am
by Green Beret
Maybe add a condition for the Axis?
You wrote: gotexplosives:
local.player = parm.other
if ( local.player.dmteam == "allies" )
{
$explosive hide
$explosive playsound pickup_explosives
waitthread global/items.scr::add_item "explosive"
thread clearused
thread lockup 600
thread lockdown 452

level.explosivecount = 20
level.flags[explosives] = 1

thread newobjective
}
else if ( local.player.dmteam == "axis" )
{
//code
}

end

Posted: Thu Apr 27, 2006 7:42 am
by WefeW
Thnx for the suggestion Green, but i have already tried that, so the axis player would get a message when he tried to pick up the explosives, no luck there either.

Posted: Thu Apr 27, 2006 9:26 am
by bdbodger
How do you call that thread with setthread on the trigger ? There is no reason for the trigger to not work unless there is a key set on the trigger or maybe it is a trigger_useonce .

aha I just looked at the bsp in notepad


"model" "*32"
"origin" "1993 3044 -481"
"classname" "trigger_useonce"
"setthread" "gotexplosives"
}

remove it at the top of your script I guess by classname and spawn a new trigger but I found 3 such triggers in the map so you may need to spawn all 3 if you where useing them .

Posted: Thu Apr 27, 2006 7:30 pm
by WefeW
Thnx for all your answers.

My conclusion to this is that I can't use the stock objectives if it's based on a trigger useonce, and therefore must be removed and install new triggers for the objectives.

Thnx again.

Posted: Fri Apr 28, 2006 4:54 am
by bdbodger
Ya that might work :) Also if you do want the allies to only use it once then put self remove after if( parm.other.dmteam = "allies") that will remove the trigger