I don't know how to do this with regex, but you can use find, mid, left, right and len expressions.
For example:
set log to right(log, len(log)-(find(log, "start text")+1))
set log to left(log, len(log)-(find(log, "end text")+1))
So you are displaying 4 sprites of random colors and you need at least one of the sprites to be red?
The easiest solution is to do something like this (assuming that frame 0 is empty/transparent, and frames 1-10 are red):
System pick random sprite ..Sprite Set animation frame to int(random(1,11)) Sprite animation frame = 0 ..Sprite Set animation frame to int(random(1,41))
The first event will pick a random sprite and set its animation frame to 1-10
The second event will pick remaining 3 sprites and set their animation frames to 1-40
The solution if to tween a value, and then on every tick while the tween is running, set sprite angle to tween.value
Here is a little demo, it allows to rotate the character by touching anywhere on the screen.
dropbox.com/s/yo345nlnu600uqk/RotateAtDistance.capx
This code works:
Note, that if you are using C2 runtime, you will need to wait 1 tick before accessing "textWidth" expression.
You can send data to a database running on your server. It's also possible to use Google Spreadsheets:
construct.net/en/tutorials/sending-data-from-construct-2-3-to-google-spreadsheet-1447
Yep, I tried modifying your example to use dt, but I couldn't figure out how your array thing works.
There are ways to make worm/snake easier, see these posts:
construct.net/en/forum/construct-2/how-do-i-18/how-do-i-sprite-follo-wsprite-129668
construct.net/en/tutorials/chain-of-sprites-with-pin-behavior-multi-sprite-snake-dragon-993
Try this example to see how you can move Physics objects with mouse:
dropbox.com/s/9cdcj8omeurgsjh/pendular-movement_dragndrop.capx
With Physics is always trial and error, you need to try lots of different things and settings to find the best working combination.
Try putting the background on a separate layer with parallax set to 0.
asdzxc You can try copying/pasting characters from this post:
stackoverflow.com/questions/17978720/invisible-characters-ascii
But, actually, I don't understand why you need it. For me, regular spaces work just fine:
See this post, there are links to demo projects:
construct.net/en/forum/construct-2/how-do-i-18/how-to-appear-coins-in-a-spl-p-116804
It's about creating coin patterns, but you can use the same method to add other objects in your level editor.
Develop games in your browser. Powerful, performant & highly capable.
If you are using C2 runtime, I recommend trying EasyStarJS addon. (I don't know if it works with C3 runtime)
construct.net/en/forum/extending-construct-2/addons-29/behavior-easystar-js-pathfindi-96215
It allows to set different cost for different tiles. So you can cover your whole layout with a tilemap, set tiles for roads and set cost=10 for all remaining tiles. EasyStar is much faster than the native Pathfinding plugin, has lots of features and you can use it in synchronous mode - update map and calculate path, all in one tick.
Member since 26 May, 2016