View previous topic :: View next topic |
Author |
Message |
cavemanerick

Joined: 03 Aug 2008 Posts: 74
|
Posted: Sun Dec 05, 2010 9:26 pm Post subject: For some reason this simple script does not work |
|
|
Its quite simple I made a stepon activated invisible npc run a script, the script simply is ment to check if your a certain hero by name and if so leave it alone if not turn on a tag easy right.
Heres What I tried orginally see what advice you can give me
if (find hero(hero:Titas))
then
else (set tag(tag:titasjump,ON))
So basicaly if your titas nothing is suppose to happen I even tried to make it set the allready off tag off again maybe to fill in the void but sadly this did not work. Explain to me what seems to be the problem here because the game is reading every hero as titas for some reason and I have no idea why. |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sun Dec 05, 2010 9:34 pm Post subject: |
|
|
"find hero" returns the hero's position in the party, or -1 if the hero is not in the party at all.
Here is what you actually meant to do:
Code: | if (find hero(hero:Titas) << 0 || find hero(hero:Titas) >> 3) then (set tag(tag:titasjump,ON)) |
Translated: turn the tag on unless Titas is in slot 0, 1, 2, or 3. _________________
|
|
Back to top |
|
 |
cavemanerick

Joined: 03 Aug 2008 Posts: 74
|
Posted: Sun Dec 05, 2010 9:56 pm Post subject: thanks |
|
|
For some reason since I havn't been programming in this language for a long time now, I forgot it goes by slots. Plus I just remebered I could proably use a if the leader of the party is:titas (actual command not coming to mind) because the main hero is locked as the front for the whole game after choosing him.
Thanks alot I appreciate the help. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Mon Dec 06, 2010 6:32 am Post subject: |
|
|
You mean
Code: | if (leader <> hero:Titas) then (set tag(tag:titasjump, ON)) |
_________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
cavemanerick

Joined: 03 Aug 2008 Posts: 74
|
Posted: Mon Dec 06, 2010 12:16 pm Post subject: Yes thankyou |
|
|
Yes thankyou. |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Mon Dec 06, 2010 7:20 pm Post subject: Re: thanks |
|
|
cavemanerick wrote: | the main hero is locked as the front for the whole game after choosing him. |
Careful, "lock hero" does not lock a hero's position in the party. _________________
|
|
Back to top |
|
 |
NeoSpade Of course!

Joined: 23 Sep 2008 Posts: 249 Location: Wales GB
|
Posted: Mon Dec 06, 2010 10:42 pm Post subject: Re: thanks |
|
|
Moogle1 wrote: | cavemanerick wrote: | the main hero is locked as the front for the whole game after choosing him. |
Careful, "lock hero" does not lock a hero's position in the party. |
Unless you use the preference bitset; "Locked Heroes can't be re-ordered", then again that might only be in the nightlies, still with new games it's automatically set on, might wanna check anyway however. |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Mon Dec 06, 2010 11:42 pm Post subject: |
|
|
That is the kind of run-on sentence you can stand up and be proud of. _________________
|
|
Back to top |
|
 |
|