0 Favourites

Incorrect Action Application

This forum is currently in read-only mode.
  • This does not seem to be working correctly:

    + System: For each Ship
    + Ship: Pick by GetToken(Ship.Value('Equipment:EngineCount'), 2, "|") Equal to ""
    [/code:usrqvyif]
    Sub-Event:
    [code:usrqvyif]+ Ship: Value 'AI:Purpose' Equal to "Dock"
    [/code:usrqvyif]
    Sub-Sub-Event:
    [code:usrqvyif]+ Ship: Value 'Movement:State' Equal to "Go"
    [/code:usrqvyif]
    Sub-Sub-Sub-Event:
    [code:usrqvyif]+ System: Ship.Value('Movement:ReverseCalc') Greater than Ship.Value('Movement:Distance')
    -> Ship: Set 'Movement:TurnTo' to Ship[Movement].Angle-180
    [/code:usrqvyif]
    
    What this code [b]should[/b] do is pick all the ship that have no engines in the second token [b]and[/b] have the purpose for docking [b]and[/b] have the movement state of "Go" [b]and[/b] if the time it takes to reverse their direction is greater than the distance they are from their target, [b]then[/b] reverse their direction.
    
    It seems to ignore that last condition. And this is driving me [b][i][u]NUTS[/u][/i][/b].
    
    Anyhoo... 
    
    What am I doing stupidilly?
    
    Thanks
  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • + System: Ship.Value('Movement:ReverseCalc') Greater than Ship.Value('Movement:Distance')
    -> Ship: Set 'Movement:TurnTo' to Ship[Movement].Angle-180[/code:2vcorxsq]
    
    Might try using "Compare a private variable"
  • Thanks, I just found out this morning what was up!

    Ship: Pick by GetToken(Ship.Value('Equipment:EngineCount'), 2, "|") Equal to ""[/code:3aupakc4]
    
    Was messing it up. I made the second token say "0" instead of nothing (and updated the picking event to match) and it works now!
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
94 21,752
LaDestitute's avatar
LaDestitute
Unread hot topic
62 7,081
chadorireborn's avatar
chadorireborn
Unread hot topic
58 5,714
BigKid Icarus's avatar
BigKid Icarus