Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

For some reason this simple script does not work

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Sun Dec 05, 2010 9:26 pm    Post subject: For some reason this simple script does not work Reply with quote

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
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Sun Dec 05, 2010 9:34 pm    Post subject: Reply with quote

"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
View user's profile Send private message Visit poster's website AIM Address
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Sun Dec 05, 2010 9:56 pm    Post subject: thanks Reply with quote

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
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon Dec 06, 2010 6:32 am    Post subject: Reply with quote

You mean
Code:
if (leader <> hero:Titas) then (set tag(tag:titasjump, ON))

_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Mon Dec 06, 2010 12:16 pm    Post subject: Yes thankyou Reply with quote

Yes thankyou.
Back to top
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Mon Dec 06, 2010 7:20 pm    Post subject: Re: thanks Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
NeoSpade
Of course!




Joined: 23 Sep 2008
Posts: 249
Location: Wales GB

PostPosted: Mon Dec 06, 2010 10:42 pm    Post subject: Re: thanks Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Mon Dec 06, 2010 11:42 pm    Post subject: Reply with quote

That is the kind of run-on sentence you can stand up and be proud of.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group