Set value to:
Array.At(0, random(Array.Height)) for 0 index column
Array.At(1, random(Array.Height)) for 1 index column
Array.At(2, random(Array.Height)) for 2 index column
In expression you directly assign value to specific attribute. The comparison can be anything but it needs to be put into a value/property/attribute. works just like if else condition (ternary) even nested one. So yes everything were put in action and you can leave the condition blank or under certain condition.
https://ibb.co.com/zx36X9D[/img]
A prove: dropbox.com/scl/fi/vclxylb1wz8yuu8t9ho2n/ternary_and_or.c3p
Of course you can put & operator for adding extra condition in expression. For mirrored the expression using width parameter but negative (-width).
You probably want to use Ternary operator to put action based on several criteria under single event like what I do in following case: onicstudios.wordpress.com/2021/02/04/formula-that-moves-object-efficiently
Try search on forum with keyword 'ternary' so you will end up with relevant topics.
The most extreme use case I came up with is this one:
dropbox.com/scl/fi/tj43mky0cinrz7516migo/moving_up.capx
Well yes maybe not directly but hopefully you find some logic about matching letter basically. One of them is by utilizing tokenat expression for checking contained character.
Here typing game example by me: dropbox.com/scl/fi/0tysjlf5b94u42isb8hmd/typingGame.capx
Wow another shot and we love alternative way get things done. Nice!
Develop games in your browser. Powerful, performant & highly capable.
Here an example by R0J0 : construct.net/en/forum/construct-3/how-do-i-8/onet-games-172483
Doppleroid
An example might be close to what you are looking for: dropbox.com/scl/fi/futhyhxo5wbfz4txot0rw/4-direction-chase-avoid.capx
I just love to think about possibilities to achieve something. Maybe the case you brought fascinate me to actualize the idea. Hopefully I can work on it in weekend.
The easiest way possible to make enemy chasing player while avoiding building is just mimick player movement with sort of delay. When player moves he will drop kind of trace/trail as waypoint for the enemy to follow through. Waypoint can be spawned when player make a direction turn or timed every x second.
Member since 22 Feb, 2012