"Actor ID" + "Group Triggering" = Success.

Omegas7Omegas7 Member Posts: 37
edited November -1 in Working with GS (Mac)
Hello, GameSalad. I was with you many months back, and now I return.
I really enjoy GameSalad, but I fear that it still lacks some major features that can really extend GameSalad's flexibility power.

First, every actor will have an "Actor ID" attribute, which can be changed anytime. It will be a string. Why? See below (point three).

Second, create a new type of "Group", called "Function". This function has an unchangeable ID (see below). It is exactly the same as a Group (it can hold behaviors), but instead, this "Function" will never be executed (see below).

Third, a new Action/Behavior called "Trigger Function". This behavior will execute a "Function ID" *inside* ALL the actors with ID X.

The above can be incredibly helpful. Let's see...

For our farming game there are three kinds of plants: "Medicinal", "Poisonous", "Awesome".
Some plants grow faster than others. That is the *only* difference.

Why create three different actors for such a small difference? Why not just one actor called "Plant Base"?
That's right, we will create one actor called "Plant Base", and put three instances of it in the scene.
One will be ID "Medicine", the other "Poison", and the other "Awesome".
Each has a function called "Grow", which will make the plant graphic size increase every time "Grow" (function) is called using the behavior "Trigger Function".

Now, lets make a new actor called Manager, which will do something like this:
[Every 1 second]
[Trigger Function "Grow" for all actors with ID "Medicine"]
[end]
[Every 2 seconds]
[Trigger Function "Grow" for all actors with ID "Poison"]
[end]
[Every 3 seconds]
[Trigger Function "Grow" for all actors with ID "Awesome"]
[end]

There, we got a way to have as many types of plants as we want with just one single actor, instead of creating an instance for each plant.

My examples are not the best, nor very understandable, but I am sure you understand how useful such features can be and can figure a better example than mine XD.

Comments

Sign In or Register to comment.