stock objectives in sp map to mp doesnt work

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
WefeW
Private
Posts: 6
Joined: Mon Apr 24, 2006 4:16 am

stock objectives in sp map to mp doesnt work

Post 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
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Tow

Post by tltrude »

You should study the original objective or tow scripts.
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

You shouldn't use things like $player playsound pickup_explosives since $player refers to every player in the game in mp .
Image
WefeW
Private
Posts: 6
Joined: Mon Apr 24, 2006 4:16 am

Post 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"?

:?:
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post 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
Image
WefeW
Private
Posts: 6
Joined: Mon Apr 24, 2006 4:16 am

Post 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.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 .
Image
WefeW
Private
Posts: 6
Joined: Mon Apr 24, 2006 4:16 am

Post 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.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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
Image
Post Reply