Page 54 of 396

Re: Ask a simple question, get a simple answer

Posted: Wed Mar 18, 2015 2:00 pm
by Isaac
sajon wrote:for i=1,10 do allPlates.floortrigger:enable(true)
for i=1,10 do findEntity(allPlates).floortrigger:enable()

AllPlates stores the names as strings, not objects ~as it should be, but you have to then use findEntity() to get the object with the name.

Re: Ask a simple question, get a simple answer

Posted: Wed Mar 18, 2015 4:27 pm
by Ciccipicci
Hello. I've just a simple request. Can someone paste complete scripts for teleport particle effect with different colors? Thanks.

Re: Ask a simple question, get a simple answer

Posted: Thu Mar 19, 2015 12:54 am
by sajon
Isaac wrote:
sajon wrote:for i=1,10 do allPlates.floortrigger:enable(true)
for i=1,10 do findEntity(allPlates).floortrigger:enable()

AllPlates stores the names as strings, not objects ~as it should be, but you have to then use findEntity() to get the object with the name.


Thanks
Isaac

I thought that it was because the array was strings, not object, but i could not figure out how to convert it. I knew when you put quotes around something it usually means it is an string. then i removed the quotes and it kept giving me table values.

My head is sore and the wall is dented...

but it worked thanks...

Re: Ask a simple question, get a simple answer

Posted: Sun Mar 22, 2015 8:59 am
by Eleven Warrior
Hi all. I have looked through the reference and I cannot find how to remove a skill from a champ? You can remove items, conditions and traits, but not sure if you can remove trait. Anyone know how to do this thxs :)

Re: Ask a simple question, get a simple answer

Posted: Sun Mar 22, 2015 9:03 am
by minmay
Use Champion:trainSkill() with a negative number.

Re: Ask a simple question, get a simple answer

Posted: Sun Mar 22, 2015 10:36 am
by Eleven Warrior
Ahhhh Thank you Minmay. That's kinda weird but it works :)

Re: Ask a simple question, get a simple answer

Posted: Sun Mar 22, 2015 3:26 pm
by almostsimon
Hi there

I just started modding and already have come across a script error (which i saw working in a tutorial somehow??):

So what I have is:

Code: Select all

function healparty()

	party:heal()

end
called via a simple floor_trigger. Then i get this error message:
attempt to call method 'heal' (a nil value) X
Can't figure out what i'm doing wrong >.<

Thanks for your help!
almost Simon


EDIT:
Nevermind, I'm just an idiot :>
Seems like some scripts worked in the first one but do not anymore?

So should be:

Code: Select all

party.party:heal()

Re: Ask a simple question, get a simple answer

Posted: Sun Mar 22, 2015 3:59 pm
by Isaac
almostsimon wrote:Seems like some scripts worked in the first one but do not anymore?

So should be:

Code: Select all

party.party:heal()
In the second game, objects now have sub-components. calls are now [often] object.component:function().
Even scripts on the game map contain script components, that contain their code and functions.

Re: Ask a simple question, get a simple answer

Posted: Tue Mar 24, 2015 11:01 am
by BuzzJ
Is there a simple way to make an object or several spawn on the same tile as the party when an (here unspecified) event occurs? Where defining the location of the party is not necessary?

Re: Ask a simple question, get a simple answer

Posted: Tue Mar 24, 2015 11:29 am
by petri
BuzzJ wrote:Is there a simple way to make an object or several spawn on the same tile as the party when an (here unspecified) event occurs? Where defining the location of the party is not necessary?
Something like this perhaps?

Code: Select all

party.party:spawn("dagger")