Variable text="your text here...." Variable result="" Repeat tokencount(text, " ")-1 times if len(tokenat(text, loopindex, " "))<5 Set result to result & tokenat(text, loopindex, " ") & " " // after the loop - trim to remove space at the end: set result to trim(result)
You can split the text using tokenat and tokencount expressions. You will probably need to get rid of all punctuation before doing that (use replace expression).
You can't store multiple words in one variable, you should use an array.
To check the length of each word use len expression.
construct.net/en/make-games/manuals/construct-3/system-reference/system-expressions
Also, check this demo:
howtoconstructdemos.com/split-text-into-separate-words-c3p
Laura_D Thanks!
Yeah, no one likes ads&IAPs in games, but it's of course a necessity. Maybe when (if) Planet-O-Tron becomes successful, I'll add more ads and become reach :)
Develop games in your browser. Powerful, performant & highly capable.
I mean there is some mistake in your events, and unless you post a screenshot or share your project file, we can't help you.
There are several ways to do it I guess, here is one:
For each Sprite JSON Set "coordinates"&Sprite.IID to array size 0 JSON Push back Sprite.X to "coordinates"&Sprite.IID JSON Push back Sprite.Y to "coordinates"&Sprite.IID
This will add a bunch of "coordinatesNN" keys, each containing an array with x,y values.
You need to post your project file or a screenshot of your code.
Use "Bullet Set angle of motion" action.
Here is a simple follower example:
howtoconstructdemos.com/simple-follower-for-8-direction-behavior-capx
Try this one:
construct.net/en/tutorials/tic-tac-toe-part-2-185
Also many examples in that last link are for playing against computer AI. Even if you don't know programming languages you might be able to figure out how the code works.
You need to set array size to width=3, height=1, depth=1
If this doesn't fix your issue, please post your project file or a screenshot of events.
You can create separate animations for each level. And in each animation add frames for locked level, unlocked level, completed level.
You need to add a parameter to your function. Right click and select "New parameter" or press P on keyboard.
Parameters in functions work like variables, but you can set them directly in function calls.
Set "Set angle=No" in Bullet properties.
Member since 26 May, 2016