Members | Sign In
All Forums > Mission Scripting
avatar

Ending message

posted Sep 21, 2012 17:45:46 by DarienTargent
Well have to say this is one of the best games I've played in a long time, thanks to Thom for creating it and for Hissatsu for the UI.

My question is a rather simple one but has been dodging me for a few days now. I created both and battle won and battle lost script with just a simple thing. (forgive me as I'm not home to post the real code)

conditions
artemis does not exist
game over != 2

actions
play message on big screen "Battle lost" and "you've been destroyed" and "20 seconds to shutdown"
set game over to 2
set shutdowntimer to 20
/event

this then should lead to the game finishing up.

I wrote the same basic concept to show victory

conditions
fleet <= 0.0
game over != 1

actions play message on big screen "Battle won" and "Congrats! and " 20 seconds to shutdown"
set game over to 2
set shutdowntimer to 20
/event

The victory works great every time. The losing I can't seem to get to show the message but when your ship is destroyed the game does end as it should. I also tried out other missions with ending messages of losing, partycrashers and one other and same thing, player ship is destroyed but that message does not show. Any ideas or anyone else run into this?
page   1
7 replies
avatar
Charlie said Sep 22, 2012 01:01:48
set game over to 2


If I had to guess, (set game over to 1) for battle won
avatar
Mike_Substelny said Sep 22, 2012 01:36:56
Party Crashers doesn't end when you win? Hmmm. That used to work. Maybe something has changed in Artemis 1.66.

Have you and your crew won "Havoc in the Hamak Sector" yet? That should also have a triggered ending.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
DarienTargent said Sep 22, 2012 02:38:58
Well tomorrow we are having a LAN for it and should play that mission, have yet to really play it. Though you have some great code ideas.

As far as the ending, I didn't win but the ship was destroyed (player) and the message "defeat" didn't show up. As far as I can find none of the missions with endings show a message if you use the condition

Object doesn't exist.

Here is the real code I used.

<event name_arme="Battle Won" id_arme="22afde41-c76c-4b63-9040-d30ad27d7f5d"><if_fleet_count comparator="LESS_EQUAL" value="0.0" fleetnumber="1" /><if_variable name="game over" comparator="EQUALS" value="1.0" /><big_message title="Battle Simulation Complete" subtitle1="Almost done" subtitle2="20 seconds to go." /><set_variable name="game over" value="2.0" /><set_timer name="start_mission_timer_4" seconds="20" /></event>

That one works great.

<event name_arme="Battle lost" id_arme="2432d35e-5503-4edd-9e98-8ac55d4a966e"><if_not_exists name="Artemis" /><if_variable name="game over" comparator="EQUALS" value="1.0" /><big_message title="Battle Simulation Complete" subtitle1="You were destroyed." subtitle2="20 seconds to go." /><set_variable name="game over" value="2.0" /><set_timer name="start_mission_timer_4" seconds="20" /></event>

This doesn't at all. game over is set to = 1 at the start of the mission. Like I said, timer does start but no message at lost. I'll have to change it and see if it does work if I set up something else to not exist.
avatar
Mike_Substelny said Sep 25, 2012 16:58:20
Did you play, Darien? What happened at the end of the mission?
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
DarienTargent said Sep 26, 2012 00:21:31
Sorry forgot to post. Yes we did and got destroyed about half way in. No message about losing. Great mission btw. We hope to give it another shot again this week.

I did figure out the code part on how to destroy and that is working now. Just nothing having to do with object does/ does not exist. I will have to work on that more this week to see if I can get an idea of what I'm missing.
avatar
JustinKelly said Sep 30, 2012 15:42:06
I have also been unable to get a defeat message to show up, in both my missions and in others (such as Party Crashers), if Artemis has been destroyed. What I'm assuming is that when Artemis explodes, the Main Screen is no longer connected in some way, so messages don't show up. I've kind of gotten around this by sending a failure message to Comms.
avatar
DarienTargent said Oct 01, 2012 20:09:02
Yup we did give it a test run this last weekend and about the same thing. Ship destroyed but nothing comes up for that. If you win by finishing other things it works great.
Login below to reply: