Page 1 of 1

Bomb won't set on objective

Posted: Tue Apr 05, 2005 8:12 pm
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?

guess

Posted: Tue Apr 05, 2005 9:09 pm
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.

Posted: Tue Apr 05, 2005 9:43 pm
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.

end

Posted: Thu Apr 07, 2005 3:23 am
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

Posted: Thu Apr 07, 2005 6:52 am
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.

Posted: Thu Apr 07, 2005 7:21 am
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...

Posted: Thu Apr 07, 2005 8:08 am
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

Posted: Thu Apr 07, 2005 4:16 pm
by strafer
So what you are saying is to take out the end before any threads start for my mods?

Posted: Thu Apr 07, 2005 9:20 pm
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

Posted: Thu Apr 07, 2005 10:07 pm
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.

Posted: Fri Apr 08, 2005 6:02 am
by strafer
It worked. :D

Thanks for your help. 8-)

Posted: Fri Apr 08, 2005 9:44 am
by Grassy
:D No probs, glad to help. Grassy