Page 1 of 1

Manialink elements in an Action?

Posted: 19 Apr 2015, 23:02
by NJin
Hello,

i want to set a manialink label element in an action.gbx file. For example: my weapon ammo is empty and it needs 5 seconds to reload it. So i want to add a label during the 5 seconds reload time but i don't know how. any helps?

Cheers,
N-Jin

Re: Manialink elements in an Action?

Posted: 20 Apr 2015, 15:03
by noyranea
Hi N-Jin,

the only way to perform this action is to use actions events :

- Send a custom action event when your weapon ammo is empty (from the action script) if needed.

- Handle the event in your gamemode script. For example, you can toggle the visibility of a layer containing the desired elements, and note that you'll have to hide it 5s later.

There might be more convenient ways to do this in the future, but for now it's your only option.

Have a nice day,

-- noyranea

Re: Manialink elements in an Action?

Posted: 24 Apr 2015, 06:05
by Dommy
You can also declare the same variable both in action and game mode script for player (owner). Mode can communicate with the action in real time with this.

So you only need to make a boolean in action while it's reloading. The mode will attach specific layer when action returns true.