Suggestion: More "Replace Object" actions for events

Post » Thu May 25, 2017 9:06 am

Hi. The rightclick > replace object is great if you have many similar/cloned objects but it does not work everytime which could save even more time developing.
Is it possible to expand this to allow more replacements? I work on a new quick game on C3 right now and I use a player sprite and a hat sprite (we all love hats, right? :D ) but when I set the hat to an image point I can't replace the object with another hat, only the original object and the player sprite is shown in the list.

Example code (NOTE: inverted conditions are not shown when you use rightclick > copy as text in C3!):
+ Function: On "ResetHats"
+ Hat1: Is UIElement
+ Hat2: Is UIElement
+ Hat3: Is UIElement
+ Hat4: Is UIElement
+ Hat5: Is UIElement
-> Hat1: Set position to (-300, -300)
-> Hat2: Set position to (-300, -300)
-> Hat3: Set position to (-300, -300)
-> Hat4: Set position to (-300, -300)
-> Hat5: Set position to (-300, -300)
>>>>>>>>>>>>>>>>>>>>>> I can just click any hat to replace the object with any other when I use set position.

+ System: Every tick
----+ System: HatID = 1
----+ Hat1: Is UIElement
-----> Hat1: Set position to (Player.​ImagePointX(​1​), Player.​ImagePointY(​1​))

----+ System: HatID = 2
----+ Hat2: Is UIElement
-----> Hat2: Set position to (Player.​ImagePointX(​1​), Player.​ImagePointY(​1​))

<<<<<<<<<<<<<< I cant switch Hat1 to another hat here when I use Player.ImagePoint. But why? It works if I double click, then go Back twice to select another Hat and then click contine twice - it keeps the "Set position" and the value. Would be great if you could just replace the objects. :)


.....
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
57
S
18
G
6
Posts: 751
Reputation: 9,551

Post » Sat May 27, 2017 4:07 pm

Maybe its a bug? All HAT objects are just a single frame sprite with no instance vars, no behavior, or anything else. Just a single image, cloned and with a different image inside. So it should be possible to select them for replacement?
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
57
S
18
G
6
Posts: 751
Reputation: 9,551

Post » Sat May 27, 2017 8:12 pm

This looks like a copy-paste of what you put on the feature suggestions tracker. Not all replacements are valid: the replacement object has to have the same instance variables, behaviors and effects. We can't make invalid replacements valid. If you think this is a valid replacement which isn't allowed, please file a bug following all the guidelines.
Scirra Founder
B
400
S
237
G
89
Posts: 24,550
Reputation: 195,537

Post » Sun May 28, 2017 4:45 am

Posted it here before I found the suggestion site. ;)
I can even replace hat with player, which has platform behavior and not the same behavior as the hat. I upload a bug example.
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
57
S
18
G
6
Posts: 751
Reputation: 9,551


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest