Ask a simple question, get a simple answer
- TheLastOrder
- Posts: 104
- Joined: Wed Oct 17, 2012 1:56 am
Re: Ask a simple question, get a simple answer
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).
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).
Last edited by TheLastOrder on Fri Dec 19, 2014 8:08 pm, edited 1 time in total.
Re: Ask a simple question, get a simple answer
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()
- TheLastOrder
- Posts: 104
- Joined: Wed Oct 17, 2012 1:56 am
Re: Ask a simple question, get a simple answer
Thorham wrote:Code: Select all
teleporter_a_1.teleporter:isEnabled()
The problem with this is that it returns always true (it´s always enabled, but it has 2 states: deactivated or activated).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).
I need it to return true ONLY if it´s activated.
Re: Ask a simple question, get a simple answer
Yes, that's why it should be:TheLastOrder wrote:Thorham wrote:Code: Select all
teleporter_a_1.teleporter:isEnabled()
The problem with this is that it returns always true (it´s always enabled, but it has 2 states: deactivated or activated).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).
I need it to return true ONLY if it´s activated.
Code: Select all
teleporter_a_1.teleporter:isEnabled()
Code: Select all
teleporter_a_1.controller:isEnabled()
- TheLastOrder
- Posts: 104
- Joined: Wed Oct 17, 2012 1:56 am
Re: Ask a simple question, get a simple answer
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...
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...
- Eleven Warrior
- Posts: 745
- Joined: Thu Apr 18, 2013 2:32 pm
- Location: Australia
Re: Ask a simple question, get a simple answer
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
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).
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- Eleven Warrior
- Posts: 745
- Joined: Thu Apr 18, 2013 2:32 pm
- Location: Australia
Re: Ask a simple question, get a simple answer
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.
- TheLastOrder
- Posts: 104
- Joined: Wed Oct 17, 2012 1:56 am
Re: Ask a simple question, get a simple answer
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!
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
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.
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.