Actor's name as quick value entry.
Here's an idea for when you have a number of actors, that all have a particular value that you need to repeatedly adjust when in the process of designing a scene layout.
For example, imagine you have 10 or 20 actors, they all have a particular starting size (or position, or rotation, or whatever), and as you design your scene layout, continually changing these values as the design evolves, you'd generally work by going in and out of the various actors, changing the size by altering the value in a Change Attribute behaviour, or maybe directly in the size attributes (etc) . . . then returning to the Inspector/Actors window, selecting the next actor, double clicking it, scrolling down to the relevant rule, change the value, return the Inspector/Actors window, select the next actor . . . and so on, a lot of clicking and moving between windows to change, for example, the sizes or positions of 10 or 20 actors.
But . . . if you replace that value with self.name you can very quickly adjust all the values straight from the Actors window . . . .
Comments
@Socks, great idea.
Now combine it with the textSubStr function, to keep the actor name descriptive.
e.g. Actor name: Ball_30
then
use textSubStr(self.Name,6,7) to get the value part.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
@Socks great idea, hadn't thought of that one. @Hopscotch nice add on, having posX, posY, width, height, etc all in the name would save a lot of clicking and time.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
You smart thing, you.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
That would also allow multiple value entries, for example width, height and rotation . . .
Actor's name '420 236 231’
Change attribute / width to textSubStr(self.Name,1,3)
Change attribute / height to textSubStr(self.Name,5,7)
Change attribute / rotation to textSubStr(self.Name,9,11)
Or you could even label values like this . . . . .
Actor's name 'w 420 h 236 r 231’
. . . Just double click over the value you want to change to highlight it and type in a new one.
Nice!
Lump Apps and My Assets
Whoops! I think I just made the very same suggestion, should have read your post first !
What ? No like ?
@Socks of course you get a like and one for @Hopscotch too .
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
Neat thinking there.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
That comment was aimed at Braydon, it was a joke !
Perhaps unlike many here - I can see through your tactics. It's amazing this showed up right as I took the lead in the All Time Leader List.
....but... This is pretty neat, so to show how nice I am... (Gulp)....I gave you an insightful.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Lol, I've got a giant secret underground storage facility with hundreds of GS tips and tricks, ready for the big push
....but... This is pretty neat, so to show how nice I am... (Gulp)....I gave you an insightful.
Dangerous stuff, I'll have to return the favour now . . . .
I know but it reminded me to also give you a like.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
@Socks -- There are some great ideas in this thread. Thanks for sharing!
@Socks you're simply a smartass:)! thanks for sharing
Cheers.
pretty cool, kind of reminds me of Unity and being able to adjust various values on the fly during play testing. Which would be a great addition to the upcoming cross platform Gamesalad!
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I was using a variation on this method today which might come in useful for someone out there.
I needed a quick and easy way of passing a value from a parent to a spawned child . . . . so as my spawned child was upright (not rotated in anyway) I co-opted the Spawn behaviour's direction value Iike this . . . .
The parent's name holds the value (just like the idea originally sketched out in this thread) . . . . then in the parent's Spawn behaviour you change the Direction field to self.name . . . then in the child actor check 'Fixed Rotation' (as you don't need the actor rotated) and use the child's self.rotation value to set whatever value or attribute you like.
As an example you can set it up just as described, and set the child's alpha channel value to self.rotation . . . so to change the alpha value of the child simply type the alpha value you want into the parent's name . . . . and that value will piggyback from the name of the parent to the Direction field to the child's alpha value . . . and of course where this comes in handy is in situations where you have a few seperate actors that all spawn a common child (from the same prototype) and you need a quick way of controlling some aspect of the child when designing your scene.
I think I've made that all sound a bit more confusing than it is. Hope it makes sense. As a method it's also useful just as a quick way to pass a value to a spawned child, even without the bit where you use the actors name as a value field.
And of course the child can pass that value onwards (modified or not) to its own child.
Thanks @Socks very useful. It might also help @jamie_c who has created a method to spawn actors with health bars.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
Yes, this is a really nifty way to pass data between parent and child actors. I use this method plentifully in my pathfinding algorithm and it works very well, even with a high number of spawns happening at once, and the children modifying the data and passing it on!
You know what would be cool. If in the new creator when you click on an actor in the pallet the self attributes pane would display without opening the actor @codewizard
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS