Page 33 of 400
Re: Ask a simple question, get a simple answer
Posted: Fri Dec 19, 2014 7:43 pm
by TheLastOrder
How can I ask in a function for a teleporter to check if it´s activated or not?
if teleporter_a_1.controller:isActivated() doesn´t work.
if teleporter_a_1.teleporter:isActivated() neither.
I´ve checked the script reference but it seems that there´s no way to call it...
teleporter_a_1.controller:isEnabled() works, but always. Because it exists. And what I need is to check if it´s activated, not if it´s "there" (either activated or not).

Re: Ask a simple question, get a simple answer
Posted: Fri Dec 19, 2014 8:00 pm
by Thorham
TheLastOrder wrote:How can I ask in a function for a teleporter to know if it´s activated or not?
Code: Select all
teleporter_a_1.teleporter:isEnabled()
Re: Ask a simple question, get a simple answer
Posted: Fri Dec 19, 2014 8:10 pm
by TheLastOrder
Thorham wrote:Code: Select all
teleporter_a_1.teleporter:isEnabled()
teleporter_a_1.controller:isEnabled() works, but always. Because it exists. And what I need is to check if it´s activated, not if it´s "there" (either activated or not).
The problem with this is that it returns always true (it´s always enabled, but it has 2 states: deactivated or activated).
I need it to return true ONLY if it´s activated.

Re: Ask a simple question, get a simple answer
Posted: Fri Dec 19, 2014 9:03 pm
by Thorham
TheLastOrder wrote:Thorham wrote:Code: Select all
teleporter_a_1.teleporter:isEnabled()
teleporter_a_1.controller:isEnabled() works, but always. Because it exists. And what I need is to check if it´s activated, not if it´s "there" (either activated or not).
The problem with this is that it returns always true (it´s always enabled, but it has 2 states: deactivated or activated).
I need it to return true ONLY if it´s activated.

Yes, that's why it should be:
Code: Select all
teleporter_a_1.teleporter:isEnabled()
And not:
Code: Select all
teleporter_a_1.controller:isEnabled()
Just like I wrote before. You tried
controller:isEnabled(), while it should be
teleporter:isEnabled(). This works. I tested it.
Re: Ask a simple question, get a simple answer
Posted: Fri Dec 19, 2014 9:26 pm
by TheLastOrder
I´m an idiot... why I never tested that.... WHY???
Thanks a lot, you´re a true hero!!!
I need to embrace the fact that not all controllers are teleporters but all teleporters are controllers...
Re: Ask a simple question, get a simple answer
Posted: Sat Dec 20, 2014 7:33 am
by Eleven Warrior
Hi all. I know how to give the party Exp for things but how do you Minus Exp or is it possible? Thxs

Re: Ask a simple question, get a simple answer
Posted: Sat Dec 20, 2014 7:35 am
by minmay
Just pass a negative number to gainExp(). You can't lower a champion's level this way, though (nor by any other means that I am aware of).
Re: Ask a simple question, get a simple answer
Posted: Sun Dec 21, 2014 2:23 am
by Eleven Warrior
Thxs minmay will try this out. I was thinking of putting a Minus sign next to the numbers , but thought nahhhh that wont work. Should have tried it anyway.
Re: Ask a simple question, get a simple answer
Posted: Sun Dec 21, 2014 10:40 pm
by TheLastOrder
Hi guys!
Q: How to avoid that the dormant entity can be attacked by the party before being awake and functional as an enemy?
Thank you so much!
GoldenShadowGS wrote:ReFreezed wrote:How do I wake up summon_stone_dormant monsters in a script? I can't seem to find a method for it.
Code: Select all
summon_stone_dormant.controller:activate()
Re: Ask a simple question, get a simple answer
Posted: Sun Dec 21, 2014 11:41 pm
by Sutekh
The summon stone's wake-up animation takes about 5 seconds by my reckoning, so here's one quick and dirty solution:
1: Place an invisible wall object on the same tile as the summon stone to 'shield' it.
2: Place a timer (with timer unchecked and disableSelf checked) set to 5 seconds and connect it to a script that destroys the invisible wall.
3: Use the same trigger that activates the summon stone's controller to also start the timer, which will destroy the invisible wall at about the same time the summon stone is fully awake.