Bomb won't set on objective

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Bomb won't set on objective

Post by strafer »

I am creating server side map mods for the objective maps. The bomb on the flak on the map the hunt will not set. I know I have run into this problem before and it was because there was a plane in the map, but I didn't add one in. There are also no errors in the console. Does anyone have any idea why this is happening?
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

guess

Post by tltrude »

How can we know what you screwed up in your script? My guess would be that you put an "end" line before the bomb thinker lines.
Tom Trude,

Image
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

I didn't see any extra ends. If you want to see my script then here it is.

http://www.strafersmods.l2p.net/mods/obj_team1.scr

It would be too long to post on the forum.
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

end

Post by tltrude »

Looks like an "end" to me. The script is very bad! You can't just throw stuff in anywhere you like. It has to be in the right order to work. It's to big of a mess for me. You need to start over.


checkwin:

while(1)
{
if(level.bombs_destroyed == 2)
teamwin allies
wait .1
}

end



//////////////////////////
level waittill roundstart
//////////////////////////



//***********************************************
// bomb planting setup
//***********************************************

$flak88_weapon1_trigger thread flak88_random_setup $flak88_weapon1_explosive $flak88_weapon1 $flak88_target1 $flak88_base1 4
$flak88_weapon1_explosive thread global/obj_dm.scr::bomb_thinker
Tom Trude,

Image
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

That end is supposed to be there. It needs to end the thread. I don't know what you are saying abou the bomb thinker...I didn't mess with that. That was from the original script.
Image
LiquorKraZy
Captain
Posts: 267
Joined: Tue Aug 10, 2004 5:38 am
Location: CA
Contact:

Post by LiquorKraZy »

i think what TLTrude is trying to say is that the bomb thinker is what sets the bomb, but your ending the thread before it gets to the bomb thinker...so either move the bomb thinker part above the thread or take out the end and put it after the bomb thinker...
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

I see it, after level waittill spawn you have your mods then an END, the bombthinker is not even being called..
Move these line up under waittill spawn BEFORE the END on the MAIN method.
//***********************************************
// bomb planting setup
//***********************************************

$flak88_weapon1_trigger thread flak88_random_setup $flak88_weapon1_explosive $flak88_weapon1 $flak88_target1 $flak88_base1 4
$flak88_weapon1_explosive thread global/obj_dm.scr::bomb_thinker
An ambiguous question will get a similar answer...
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

So what you are saying is to take out the end before any threads start for my mods?
Image
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

strafer wrote:So what you are saying is to take out the end before any threads start for my mods?
No no no.... The scr always should follow a set format.

main:

cvars etc here

level waittill prespawn

exec dmstuff
start ambient sounds etc

level waittill spawn

call all your regular threads from here
thread grassy_is_cool
also set up any regular level variables

//obj game
level waittill roundstart

command lines for bomb stuff here
here set up any obj related level variables

//end of main method
end


//all threads go down here

Grassy_is_cool:
while($grassy Isalive) {
all praise $grassy
}
end
An ambiguous question will get a similar answer...
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

I see. I will test that out when I get home from work tonight and I will update you on what happened. Thanks for your replies.
Image
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

It worked. :D

Thanks for your help. 8-)
Image
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

:D No probs, glad to help. Grassy
An ambiguous question will get a similar answer...
Post Reply