Adding objective to T.O.W

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
LtNeil
Sergeant
Posts: 54
Joined: Sun Nov 14, 2004 8:46 pm
Location: southend on sea
Contact:

Adding objective to T.O.W

Post by LtNeil »

Hello there!
im making a tow map for breathrough and i wondered if any of you know how to add an objective to the on screen display.
Is it possible to add a sixth objective?i have made the objective already and it works fine the only strange problem i have is that i can not get the mission to show on screen!!?

Any help (as usual) would be great
cheers!
My candle burns at both ends it will not last the night but oh my foes and oh my friends it gives a lovely light.
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

How about just following how it's done in the stock scr's, you can have any number of obj's.

init_objectives:
$obj_radio_tower ControlledBy 0
$obj_radio_tower initialize
$obj_radio_tower SetCurrent 0
thread set_objectives
end

set_objectives:
//First Allies
if( $obj_radio_tower.ControlledBy != 1 )
{
iprintln ( loc_convert_string "Allies -- Turn off the radio!" )
$obj_radio_tower SetCurrent 1
}
//Now the Axis
if( $obj_radio_tower.ControlledBy != 0 )
{
iprintln ( loc_convert_string "Axis -- Turn on the radio!" )
$obj_radio_tower SetCurrent 0
}
end
LtNeil
Sergeant
Posts: 54
Joined: Sun Nov 14, 2004 8:46 pm
Location: southend on sea
Contact:

Post by LtNeil »

ah i see i did'nt explain myself well enough.I have cpoied how the script works and the objective works fine but when you play the game and you hold down tab to see your missions i.e axis turn on radar dish,allies stop airstrike.etc. i can not get the sith mission to show up on the screen with the little tick box.hope this is more understandable.

thanks
My candle burns at both ends it will not last the night but oh my foes and oh my friends it gives a lovely light.
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

Ahh I see, I think you might be out of luck there. All other stock maps only have the 5 entries for the score board.
Another way to do it would be to print a message onscreen when the objective is ready to be completed, or show a reminder msg every now and then until it has been completed and then stop the onscreen message.
for eg;
level.targetstodestroy = 6
level.targetsdestroyed = 0

thread bomb_six_obj
thread obj6_onscreen_reminder

bomb_six_obj:
bla bla
bla bla...
//bomb has gone off and axis are not happy :)
level.obj6_complete =1
level.targetsdestroyed++
end

obj6_onscreen_reminder:
while ( level.targetsdestroyed < level.targetstodestroy )
{
if ( level.ob6_complete !=1 )
{
iprintln "Objective 6 - Allies need to destroy this valuable Axis object "
}
wait 60
}
end
LtNeil
Sergeant
Posts: 54
Joined: Sun Nov 14, 2004 8:46 pm
Location: southend on sea
Contact:

Post by LtNeil »

well thats a good idea and thanks very much for your help m8!
But i think i'll just stick to the five obj's.Thanks anyway though!
My candle burns at both ends it will not last the night but oh my foes and oh my friends it gives a lovely light.
Post Reply