codah's Forum Posts

  • post a capx please

  • Have you tried a 'wait 0' after the Create object? Or maybe use an 'on created' event to do the init.

  • Currently you can't do that. I also do an external search sometimes. One small tip, if you click on the object on the project tree view, and no properties are displayed for the object, then you know it is not used anywhere.

  • Make sure you preload the interstitial so there should be no delay showing it. Don't attempt to show it until you check for On interstitial received. Only show it at the end of the game where timing doesn't matter.

  • right click on it and choose 'invert'

  • I didn't do the dropdown..

  • Awesome

  • Here's a working example.

    [attachment=0:1hv3v8f1][/attachment:1hv3v8f1]

    Works here, that's fun Anyone out there used this much in their games?

  • If you've tried it and it doesn't then I guess it doesn't Would it be meaningful if you had say, a 3D array?

    edit: sorry you've specifically said for X elements. I guess that could make sense. But a quick test shows it doesn't work. I normally use normal for loops and Array.at() anyway. Maybe it's the old school developer in me It's just more flexible IMO

  • Glad you have a solution. I prefer instance variables as they don't pollute the code and can be used more easily for picking. By all means share your solution.

  • There's probably MUCH better ways of doing this but something that comes to mind is that you could divide the track into zones, and each zone would have a range of directions (angles) the car is allowed to have, and if it's outside of those angles then it's going in the wrong direction. For example in the track you showed us, the left side of the track would restrict the car to angles 180 to 360 (or whatever). The right hand side would be 0 to 180, etc. To know which zone the car is in you could use invisible sprites that cover each zone and do an overlapping test with that sprite and the car, or check x,y coordinates to determine which zone the car is in.

    Another thought is that if the driver is collecting checkpoints in the wrong order, you'd know they are going in the wrong direction.

  • You could do System: 0 < array.at(1) < 3

    Actually I'll have to remember to use this more often myself. I know it's really meant for decimal values but it's a nice shortcut.

    BTW you could merge lines 2, 3, 4 into one line and 5, 6, 7 into one line as well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok so stick with the different sprites.

    Put the sprites in a family

    Spawn an instance of the family (which spawns a random sprite from the family)

    Do what you want with it..

  • This gets asked a lot Have a search around you'll find ideas.

  • The Toggle-switch behaviour might be useful too.