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

Set battle on tile location

 
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: Thu Jul 23, 2009 1:07 pm    Post subject: Set battle on tile location Reply with quote

Well i really hate to keep coming abck and asking for help because i feel like i'm leaching off you guys but i do need help again grrr...
I need a simple script that allows a battle to show up or whatever commands i want in there when a player named michael steps on a certain part of the map. I tried useing the scripts they have in archieves and such but none of them worked this is what i have so far see if you can help thanks.

Code:

If(check tag(tag:celler)==off) then (
If ((hero X (hero:michael))==67 and  (hero Y (hero:michael))==20)
then (suspend player
show textbox(63)
fight formation(52)
resume player

set tag(tag:celler,on)
)))
end


Last edited by cavemanerick on Thu Jul 23, 2009 3:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Thu Jul 23, 2009 1:51 pm    Post subject: Reply with quote

Code:

If(check tag(tag:celler)==off) then (
If ((hero X (rank in caterpillar(hero:michael)))==67 and  (hero Y (rank in caterpillar((hero:michael)))==20)
then (suspend player
show textbox(63)
fight formation(52)
resume player

set tag(tag:celler,off)
)))
end


I think the problem here is that you are using a hero ID "hero:michael" when the "hero X" and "hero Y" commands expect a hero's position in the walkabout party. Use "rank in caterpillar" to get that.

Although, a much easier way to make a script run when the hero steps on a specific spot is to trigger the script using an invisible step-on NPC
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Thu Jul 23, 2009 3:25 pm    Post subject: Reply with quote

Well i figured that but i was trying to save either scripts, or npcs by trying this out, but ehh i guess i'l resort to that still just trying to get as much time working with diffrent ways to do stuff with plot scripting as possible. Since i'm rusty with programming in general.
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: Fri Jul 31, 2009 1:23 am    Post subject: Re: Set battle on tile location Reply with quote

cavemanerick wrote:
Code:

If(check tag(tag:celler)==off) then (
If ((hero X (hero:michael))==67 and  (hero Y (hero:michael))==20)
then (suspend player
show textbox(63)
fight formation(52)
resume player

set tag(tag:celler,on)
)))
end


As well as too many closing brackets, there's another mistake in that script: you forgot to put commas around 'and'. HSpeak won't mention what the problem is because of a bug, but that script fragment should not compile.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Spoon Weaver




Joined: 18 Nov 2008
Posts: 421
Location: @home

PostPosted: Fri Jul 31, 2009 6:52 am    Post subject: Re: Set battle on tile location Reply with quote

Code:

If (check tag(tag:celler)==off)
 then (
If ( (hero X (hero:michael)==67) ,and , (hero Y (hero:michael)==20) )
 then (
suspend player
show textbox(63)
fight formation(52)
resume player
set tag(tag:celler,on)
)
)



went ahead and fixed that for you. You seemed to have bracket/comma issuses in the line

If ( (hero X (hero:michael)==67) ,and , (hero Y (hero:michael)==20) )

I wasn't sure about the ending, because this isn't a full script, so I removed the parts that didn't effect this script part directly.
Also, as mentioned, the variables used for tags and/or hero might also be at fault.
Other then those things, I don't see why this wouldn't work.

I have a question about it though. Is it suppose to trigger when the character steps on the tile. Like, if he was 3rd in caterpillar mode, it would trigger when HE stepped on it? Because, that's most likely possible, but would take other steps to achieve.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Aug 01, 2009 4:04 pm    Post subject: Reply with quote

Oh, and one more thing: You probably want to add 'plot:wait for text box' after showtextbox, otherwise you won't be able to read it until after the battle.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
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