Magistross's Recent Forum Activity

  • Not sure of what want exactly, but would this be of help ?

  • Looks like a side-effect of using the wait action. I did a quick test, look at the attached picture.

    [attachment=0:38b700bu][/attachment:38b700bu]

    What would you expect to output to be ? Well I sure expected to see 5 followed by 3. But none of that, it actually output 5 twice...

  • Here's an exemple with a Tilemap.

  • From manual, this might apply to your situation :

    [quote:gqqw1emt]Note that previewing with node-webkit runs node-webkit directly from the Construct 2 install directory. As a consequence, the AppFolder expression will return <install path>\exporters\html5\node-webkit\win32. If this poses a problem for you, use the following workaround: have a global string variable; if 'Is in preview' is true hard-code it to some development folder somewhere else, otherwise set it to NodeWebkit.AppFolder. Then use the global variable instead of the AppFolder expression.

  • The best solution will always be the condition "Pick by UID". It can pick instance that have just been created, even when not in a top level event. As good as this solution is, it's not always practicable.

  • Haha, yeah, I did that just to be safe, although there might have been a better way. But this method was quick and easy.

    We don't know for sure which instance is the collider nor which instance is the collided, it all depends on their UID (i.e. order of creation) I believe.

  • I took your game2.capx and modified it to make it work like I think you intended.

    I used two recursive functions, one for each "direction" of neighbour checking. As Aphrodite hinted, the magic come from the "For each (ordered)", which combined with an immediate "Stop loop", essentially turns it into a makeshift "Pick by ordering". Each time a color match is made, the functions are called again with new parameters, up until no match are found.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If your SOL contains more than one of your "enemy" object, only the first one will be affected. An explicit for each is thus needed to ensure the function is called multiple times (if needed).

  • A common "id" instance variable is one way to do it. But as you said, you could have created a AICarUID instance variable in your "coverSprite" object, then in a "For Each AICar", pick coverSprite object where coverSprite.AICarUID = AICar.UID

  • Your best bet is to use manual target acquisition. Here's your capx modified so your turret acquires the closest target in its line of sight.

  • If I remember correctly, "Else" resets the SOL altogether.

  • Using the 8 directions movement, it's quite easy to implement a basic "strafing". See below :

Magistross's avatar

Magistross

Online Now

Member since 4 Jul, 2011
Last online 19 Jan, 2025

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies