|
|
 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
Nicoman35
Joined: 17 Nov 2005
Location: Bochum
|
Posted: Sun, 27. May 12, 14:53 Post subject: |
|
|
I got an issue.
The Marauder is an al plugin which can be turned off in the al settings. So the cue has to be reset, if the object marauder is not found. A check for the object this.TheMarauder is done to reset the cue in case it is not exsitent. Unfortunately, the cue is reset though the Marauder has been created. It seems, that this
| Code: |
<create_actor name="this.Mechanic" race="boron" character="{8370,31}" face="203" location="crew" object="this.TheMarauder"/>
|
does not create the object??
And later on, this check is always positive, as the object does not exist. What to do?
| Code: |
<object_exists object="Marauder_M01_prepare.TheMarauder" negate="1"/>
|
Here is my actual version:
| Code: |
<cue name="Marauder_M01_prepare" version="3" comment="Find my Marauder">
<condition>
<check_age value="{player.age}" min="10s"/>
</condition>
<action>
<do_all>
<find_station group="this.Marauders" multiple="1" typename="SS_FAC_DON_MARANI" race="pirate">
<jumps min="0"/>
</find_station>
<load_text fileid="8370"/>
<do_all exact="{group.object.count@this.Marauders}" counter="counter1">
<do_if value="{object.name@{group.object.{counter@counter1}@this.Marauders}}" exact="The Marauder">
<create_actor name="this.Mechanic" race="boron" character="{8370,31}" face="203" location="crew" object="this.TheMarauder"/>
<incoming_message author="{actoer.name@this.Mechanic}" text="Hello, {player.name}. You can contact me at {object.name@{group.object.{counter@counter1}@this.Marauders}} in {object.sector.name@{group.object.{counter@counter1}@this.Marauders}}"/>
</do_if>
</do_all>
</do_all>
</action>
<cues>
<cue name="Marauder_M01_notfound" comment="Reset the search if there is no Marauder">
<condition>
<object_exists object="Marauder_M01_prepare.TheMarauder" negate="1"/>
</condition>
<timing>
<time min="10s" max="15s"/>
</timing>
<action>
<do_all>
<incoming_message author="Me" text="(Version 3) The Marauder not found! Cue reset!!"/>
<reset_cue cue="Marauder_M01_prepare"/>
</do_all>
</action>
</cue>
</cues>
</cue>
|
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Ketraar


Joined: 21 May 2004 Posts: 7293 on topic Location: Guimarães (Portugal)

|
Posted: Sun, 27. May 12, 15:50 Post subject: |
|
|
Because Marauder_M01_prepare.TheMarauder does not exist in your code.
add a line in the do_if before the create_actor that sets the object name to be like you have it
| Code: |
| <set_object name="this.TheMarauder" value="{group.object.{counter@counter1}@this.Marauders}}"/> |
This way you have the reference right.
As for the condition I suggest it to be like this
| Code: |
<condition>
<check_all>
<cue_is_complete cue="Marauder_M01_prepare"/>
<object_exists object="Marauder_M01_prepare.TheMarauder" negate="1"/>
</check_all>
</condition> |
Just to make sure the cue is really done before it triggers.
Mind again if multiple objects are true, only the last one will be right as they override the reference as the do_if filters through the group.
MFG
Ketraar
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Nicoman35
Joined: 17 Nov 2005
Location: Bochum
|
Posted: Sun, 27. May 12, 18:37 Post subject: |
|
|
Oh yes. Now everything works as it should. Nice work Ketraar! Only multiple Marauders with the same name remain a problem.
Only falult in the code was a "}" too much at the end of the line. Because with it it would not work. Proud of me to find it by myself . Here the correct line:
| Code: |
<set_object name="this.TheMarauder" value="{group.object.{counter@counter1}@this.Marauders}"/>
|
Oh, just one last thing: Is a md script bound to a savegame? Because changes only take effect in a new game start. Any way to make changes available in savegames?
cheers
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
|
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
 |
|
|
|
|
|