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

Changing characters

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




Joined: 12 Dec 2004
Posts: 5

PostPosted: Sun Dec 12, 2004 3:46 pm    Post subject: Changing characters Reply with quote

Hi. I'm trying to take a character out of my party and put in another. It's not compiling, so I was wondering if anyone could help me? The script looks like this:

Define Script (1,Change,none)
script, My Script, begin
addhero (1)
swap in hero (1)
deletehero (0)
show text box (0)
end

This is the first time I've plotscripted, and I know there's probally multiple places where I could use some fine-tuning. If anyone could help me, I'd appreciate it.
Back to top
View user's profile Send private message
Uncommon
His legend will never die




Joined: 10 Mar 2003
Posts: 2503

PostPosted: Sun Dec 12, 2004 3:55 pm    Post subject: Reply with quote

Well, the reason it's not compiling is because you named the script "change", but when asked the script's name, put "my script".
Change "script, My Script, begin" to "script, Change, begin". That'll let it compile. We'll talk more from there.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
XerotheYokai




Joined: 12 Dec 2004
Posts: 5

PostPosted: Sun Dec 12, 2004 6:51 pm    Post subject: Reply with quote

Thanks a lot. The script almost compiled! It got stuck at line 4, but here's the whole thing anyways:

Define Script (1,change,0)

script,change,begin
addhero (1)
swap in hero (1)
deletehero (0)
show text box (0)

end

I rea;;y appreciate ya'll for helping.
Back to top
View user's profile Send private message
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Mon Dec 13, 2004 6:13 am    Post subject: Reply with quote

Well, for starters, when you use "add hero", you don't need to use "swap in hero", because the hero is already in the party. I think what you're trying to do is pull out the starting hero to throw in another, so here's what you'd want to do:

Code:

Define Script (1,change,0)

script,change,begin
addhero (1)
swap by position (0,1)
wait (1)
deletehero (0)
wait (1)
show text box (0)

end


Now, I just threw in the "wait (1)" commands for good measure; you don't necessarily have to use them in this script. "Swap by position" will swap heroes in the party according to where they stand. Since "Hero 0" is the leader and "Hero 1", after added to the party, is in the Party slot 1, they will be swapped so "Hero 1" will be leader. From there, you can "delete hero (0)".

One thing I think I should point out though: Are you sure you want to permanently kill off Hero 0? When you use "Delete Hero", it removes that hero from the party altogether, and if you re-added him, he'd start out at the base stats you gave him. If you just want him out of the party for a while, but keep his stats, I'd recommend you resort to this instead:

Code:

Define Script (1,change,0)

script,change,begin
addhero (1)
swap by position (0,1)
wait (1)
swap out hero (0)
lock hero (0)
wait (1)
show text box (0)

end


Here, instead of deleting him, I swapped him out and locked him, so he will be in the Reserve party, but he'll stay there where the player can't pull him out until you specify later that you want him back in the party.

Hope that was some help to you.
_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Me
HI.




Joined: 30 Mar 2003
Posts: 870
Location: MY CUSTOM TITLE CAME BACK

PostPosted: Mon Dec 13, 2004 11:47 am    Post subject: Reply with quote

You don't need the wait commands. Since the script isn't a loop, there's no chance of it recurring infinitely and overloading the buffer.
Back to top
View user's profile Send private message AIM Address
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 13, 2004 11:50 am    Post subject: Reply with quote

And the heroswapping occurs instantly, if that's what you're looking out for. If it didn't, you should still use "wait(0)" instead to avoid the slight delay.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
XerotheYokai




Joined: 12 Dec 2004
Posts: 5

PostPosted: Mon Dec 13, 2004 12:25 pm    Post subject: Reply with quote

Setu_Firestorm wrote:
Well, for starters, when you use "add hero", you don't need to use "swap in hero", because the hero is already in the party. I think what you're trying to do is pull out the starting hero to throw in another, so here's what you'd want to do:

Code:

Define Script (1,change,0)

script,change,begin
addhero (1)
swap by position (0,1)
wait (1)
deletehero (0)
wait (1)
show text box (0)

end


Now, I just threw in the "wait (1)" commands for good measure; you don't necessarily have to use them in this script. "Swap by position" will swap heroes in the party according to where they stand. Since "Hero 0" is the leader and "Hero 1", after added to the party, is in the Party slot 1, they will be swapped so "Hero 1" will be leader. From there, you can "delete hero (0)".

One thing I think I should point out though: Are you sure you want to permanently kill off Hero 0? When you use "Delete Hero", it removes that hero from the party altogether, and if you re-added him, he'd start out at the base stats you gave him. If you just want him out of the party for a while, but keep his stats, I'd recommend you resort to this instead:

Code:

Define Script (1,change,0)

script,change,begin
addhero (1)
swap by position (0,1)
wait (1)
swap out hero (0)
lock hero (0)
wait (1)
show text box (0)

end


Here, instead of deleting him, I swapped him out and locked him, so he will be in the Reserve party, but he'll stay there where the player can't pull him out until you specify later that you want him back in the party.

Hope that was some help to you.


It was much help. I'd never though of using those commands, so I thank you. But hspeak is still having problems. I think its because I'm using the HamsterSpeak script editor. Anyways, it says it doesnt recognize the name Addhero. It has not been defined as a script, constant, variable, or anything else. This is basically the same problem I've been getting this whole time.
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 13, 2004 1:14 pm    Post subject: Reply with quote

You need to "include plotscr.hsd" in your script.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
XerotheYokai




Joined: 12 Dec 2004
Posts: 5

PostPosted: Mon Dec 13, 2004 3:13 pm    Post subject: Reply with quote

Thanks. That did it, and now my scro[ts can finally compile! thanks a lot!
Back to top
View user's profile Send private message
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Tue Dec 14, 2004 1:36 pm    Post subject: Reply with quote

Aw, man! Now why didn't I catch that? XP
_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
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