You can use "Set position to another object" action, it allows to select image point.
Or you can set position to Head.ImagePointX("pointname"), Head.ImagePointY("pointname")
How do I tag users who have space in their name? For example:
construct.net/users/312745/legendary-studio
I tried "@legendary-studio", "@legendary_studio" and "@legendary studio", none of these methods work.
—
Please send me your project file and I'll see what I can do.
My email: doperst2006 (at) gmail.com
Bump!
The workaround is to not use any Form Control objects. There are lots of issues with them.
You can make your own custom text input box:
scirra.com/tutorials/739/your-own-textbox
What does "origin name" mean? If you want to set item to player position, do this:
Item set position to (Player.X, Player.Y)
Make sure that items and player sprites are on the same layer, or on layers with the same parallax.
Sprite instances should be on this layout to be able to pick them. It's not possible to pick something from another layout.
Just copy/paste 5 copies (instances) of Items_common sprite, set correct animations and move them off-screen.
Develop games in your browser. Powerful, performant & highly capable.
Maybe I don't understand your issue, or you don't understand what I'm trying to say... Check out this demo (you should be able to open it in C3):
dropbox.com/s/209see2urs7zd59/PickRandomItem.capx
Just add all items to the layout (outside of visible area) and pick one random instance. This is the easiest solution. See my previous comment.
.
I told you many times, arrays and dictionaries are not that complicated. You just need to start using them. It's up to you of course, but if you choose to do everything with global variables, you'll spend ten times more time and will end up with messy and unmanageable code.
You mean this?
dropbox.com/s/av9tpep503duvwm/DoublePendulum.capx
You can make a While loop to repeat random if it chooses a wrong item, but this is not a great solution. If you have 20 items and 20 variables, this event will be huge!!!
One way to do this is to keep all these item sprites on the layout (you can move them outside of the visible area). Then use "System pick random instance" event to pick a random item. You can destroy items after they are found or add an instance variable "isFound" to this sprite and do something like this:
Item isFound=0 System pick random instance of Item -> Item set isFound=1 -> Item set position to (mouse.X, mouse.Y)
Another good solution would be using an array or dictionary with all items and remove items that have been found from it. I know that you are trying to avoid using arrays and dictionaries, but I have no idea why :)
I once did a demo on terrain flooding, this is somewhat similar. Here is what I came up with:
dropbox.com/s/yd0p2klipw3mccn/DungeonWallMarkers.capx
This is probably not the best example and it needs to be optimized. I'm using Water tilemap to visualize "flooding" the dungeon and detect walls, you can use an array instead, it will likely work faster. Also, maybe call the function recursively for each neighboring cell, instead of looping through the entire array many times.
Member since 26 May, 2016 Last online 11 Oct, 2026