 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
NeoSpade Of course!

Joined: 23 Sep 2008 Posts: 249 Location: Wales GB
|
Posted: Fri Sep 26, 2008 11:13 pm Post subject: NeoSpade's Plotscripting questions |
|
|
How do I make it so that you can't remove a specific hero from a certain slot (a.k.a: main hero, like on console based RPGs) I know how to stop a hero from being removed from the active party.
assuming that the hero is on the active party this locks him/her on? But that doesn't stop me from moving them about on the active team, someone please help! (also I may need a plotscript to remove them afterwards if its complicated)
Last edited by NeoSpade on Wed Oct 01, 2008 1:07 am; edited 1 time in total |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Sat Sep 27, 2008 12:55 am Post subject: |
|
|
There is not currently any easy way to lock a hero to a specific slot, you can only lock into the active party or out of the active party.
However, you can write a plotscript that forces a particular hero to be the leader, and you can then run that before battles, or after exiting the menu |
|
Back to top |
|
 |
NeoSpade Of course!

Joined: 23 Sep 2008 Posts: 249 Location: Wales GB
|
Posted: Wed Oct 01, 2008 1:20 am Post subject: |
|
|
Umm, right now I have this great Idea for a character, he has this spell list that works like Steiners Sword Magic in FF9, but I need to know how to get this to work, the idea is that he has different spells available on the list depending on which of the other 8 charaqcters are on the party with him.
I know what I need to make it work...but I don't know how to get it to work, I know that I'll need an IF statment that checks which heros are on the party (by looking at what tags are on) then makes that hero learn/forget spells due to that, also, he should only be able to learn spells that that hero already knows. Umm, I'll try and make this work, but I'll edit this if I can't get it to do so...
EDIT: Okay heres the script so far, will this work?
Code: |
plotscript, GoraphsSwordMag, begin
if (check tag (Tag:GoraphInTeam==On))
then
(
(check tag (Tag:TheoInTeam==On)
then (teach spell (hero:Goraph, spell))
)
else
(forget spell (hero:Goraph, spell)
)
else
end
|
EDIT2:
Okay I've revised the script, and it keeps yelling at me in HSpeak saying something along the lines of: "If statment has 2 conditions, it should only have one, use and and or for complex conditions", and when I do it yells at me again, please help!:
Code: | plotscript, GoraphsSwordMag, begin
if (check tag (Tag:GoraphInTeam==On))
then
(
if (check tag (Tag:TheoInTeam==On)
then (teach spell (hero:Goraph, spell))
)
else
(forget spell (hero:Goraph, spell)
)
else
end
end |
|
|
Back to top |
|
 |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Wed Oct 01, 2008 7:09 am Post subject: |
|
|
You put the parenthesis in the wrong spots.
It should be:
Code: | if (check tag (Tag:GoraphInTeam)==On)
then( etc... |
Check Tag takes in one argument (the tag) and by default, sees if it is on.
You had '== on' inside of the parenthesis, so Hspeak was getting confused by that.
So you could also just have:
Code: | if(checktag(Tag:GoraphInTeam))
then( etc... |
|
|
Back to top |
|
 |
NeoSpade Of course!

Joined: 23 Sep 2008 Posts: 249 Location: Wales GB
|
Posted: Wed Oct 01, 2008 7:11 am Post subject: |
|
|
oh, well thanks a lot, I was really worried that I was gonna get a reply like:
this is all compleatly wrong, but thank goodness it was only that 1 little thing, thank you very much. |
|
Back to top |
|
 |
NeoSpade Of course!

Joined: 23 Sep 2008 Posts: 249 Location: Wales GB
|
Posted: Wed Oct 01, 2008 7:22 am Post subject: |
|
|
Oh no! New problem!
"if does not have then or else"
Code: | plotscript, GoraphsSwordMag, begin
if (check tag (Tag:GoraphInTeam)==On)
then (if (check tag (Tag:TheoInTeam)==On))
then (teach spell (hero:Goraph, spell))
else (forget spell (hero:Goraph, spell))
else
end |
|
|
Back to top |
|
 |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Wed Oct 01, 2008 7:37 am Post subject: |
|
|
NeoSpade wrote: | Oh no! New problem!
"if does not have then or else"
Code: | plotscript, GoraphsSwordMag, begin
if (check tag (Tag:GoraphInTeam)==On)
then (
if (check tag (Tag:TheoInTeam)==On)
#This Parenthesis is your problem.
#You closed off your then() so that the if() inside could not access
#anything else.
#The end parenthesis should be placed after the else(forget spell)
)
#This parenthesis above ^
then (teach spell (hero:Goraph, spell))
else (forget spell (hero:Goraph, spell))
#Also, the below 'else' does nothing. What is it doing here?
else
end |
|
Code: | plotscript, GoraphsSwordMag, begin
if (check tag (Tag:GoraphInTeam)==On)
then (if (check tag (Tag:TheoInTeam)==On)
then (teach spell (hero:Goraph, spell))
else (forget spell (hero:Goraph, spell))
)
end |
|
|
Back to top |
|
 |
NeoSpade Of course!

Joined: 23 Sep 2008 Posts: 249 Location: Wales GB
|
Posted: Wed Oct 01, 2008 8:04 am Post subject: |
|
|
Thanks a lot for the help TwinHamster, sorry for being so useless! I'll studdy all the commands in the plotscripting dictionary, and look at all of the tutorials so that this never happens again! |
|
Back to top |
|
 |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Wed Oct 01, 2008 8:44 am Post subject: |
|
|
NeoSpade wrote: | Thanks a lot for the help TwinHamster, sorry for being so useless! I'll studdy all the commands in the plotscripting dictionary, and look at all of the tutorials so that this never happens again! |
It's no problem at all.
There's no need to aim for perfection. Everybody makes mistakes.
However, what you should try to do is just practice plotscripting to understand how the structure of scripts works so that you can fix your own problems more easily.
And if there's a problem you can't fix, then there's no shame in coming back here for help.
Even the Pros can get baffled by coding ;) |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Wed Oct 01, 2008 10:10 am Post subject: |
|
|
What I really want to do is to add tag functionality directly to hero's spell lists, so that not only can you have spells taught by an item or learned from level-ups, but you can also have spells that become available when a particular tag is ON. This will make this sort of thing easy to do even with no scripting, and it will even allow new spells to be added in-battle, since attacks already have the ability to manipulate tags. |
|
Back to top |
|
 |
NeoSpade Of course!

Joined: 23 Sep 2008 Posts: 249 Location: Wales GB
|
Posted: Fri Oct 03, 2008 7:12 am Post subject: |
|
|
Okay right I keep getting the message: script menu is missing end or ), but its got an end, heres the script, help me please!
Code: | plotscript, menu, begin
#Hero in slot 0
set variable (currentHP, get hero stat (0,stat:HP,current)
set variable (maxHP, get hero stat (0, stat:HP, maximum)
set variable (currentMP, get hero stat (0,stat:MP,current)
set variable (maxMP, get hero stat (0, stat:MP, maximum)
set variable (lvl, get hero level (0)
set variable (nxtlvl, get hero level (0)=+1)
#Hero in slot 1
set variable (currentHP, get hero stat (1,stat:HP,current)
set variable (maxHP, get hero stat (1, stat:HP, maximum)
set variable (currentMP, get hero stat (1,stat:MP,current)
set variable (maxMP, get hero stat (1, stat:MP, maximum)
set variable (lvl, get hero level (1)
set variable (nxtlvl, get hero level (1)=+1)
#Hero in slot 2
set variable (currentHP, get hero stat (2,stat:HP,current)
set variable (maxHP, get hero stat (2, stat:HP, maximum)
set variable (currentMP, get hero stat (2,stat:MP,current)
set variable (maxMP, get hero stat (2, stat:MP, maximum)
set variable (lvl, get hero level (2)
set variable (nxtlvl, get hero level (2)=+1)
#Hero in slot 3
set variable (currentHP, get hero stat (3,stat:HP,current)
set variable (maxHP, get hero stat (3, stat:HP, maximum)
set variable (currentMP, get hero stat (3,stat:MP,current)
set variable (maxMP, get hero stat (3, stat:MP, maximum)
set variable (lvl, get hero level (3)
set variable (nxtlvl, get hero level (3)=+1)
end |
Edit: d'oh! I just saw the problem then its okay I've sorted it now! |
|
Back to top |
|
 |
NeoSpade Of course!

Joined: 23 Sep 2008 Posts: 249 Location: Wales GB
|
Posted: Fri Oct 03, 2008 8:59 am Post subject: |
|
|
Umm...how do I open multiple text boxes all at once, my new menu system relies on this to work! |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Fri Oct 03, 2008 9:17 am Post subject: |
|
|
You can't. What are you trying to do? _________________
|
|
Back to top |
|
 |
NeoSpade Of course!

Joined: 23 Sep 2008 Posts: 249 Location: Wales GB
|
Posted: Fri Oct 03, 2008 9:20 am Post subject: |
|
|
I'm trying to do an Final Fantasy style menu where it shows the portraits and basic stats (HP, MP, Level and next level) I've got it to work but the text boxes can't all open at once, so its kinda sad, but on the up side if a multi text box command ever gets applied I can put this into full swing!
Edit: If your interested this is what the script looks like, I've tested it and all the other aspects of it work, its just the multi-text box triggering thats going to stop this from working:
Code: | #This script will be usefull once a multi-text box command gets implimented,
#I will explain how it works, but most of it is self explanentry.
#To get this to work make sure that all your menus allow gameplay and scripts to be activated, but also have them all
disallow gameplay even if allowed.
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#These are the globals that are used with this script.
global variable (1, currentHP)
global variable (2, maxHP)
global variable (3, currentMP)
global variable (4, maxMP)
global variable (5, lvl)
global variable (6, nxtlvl)
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#This is called by the showstats script.
plotscript, menu, begin
#Hero in slot 0
set variable (currentHP, get hero stat (0,stat:HP,current stat)) #This will be used to write the current HP like this:
set variable (maxHP, get hero stat (0, stat:HP, maximum stat)) #HP: ${V1}/${V2}
set variable (currentMP, get hero stat (0,stat:MP,current stat)) # the same here only with MP:
set variable (maxMP, get hero stat (0, stat:MP, maximum stat)) #MP: ${V3}/${V4}
set variable (lvl, get hero level (0)) # this will do level: Lvl: ${V5}
set variable (nxtlvl, get hero level (0)+1) # this will show the next level: Nxt: ${V6}
end
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#Call this script from Hero 0's stats text box.
plotscript, menu2, begin
#Hero in slot 1
set variable (currentHP, get hero stat (1,stat:HP,current stat))
set variable (maxHP, get hero stat (1, stat:HP, maximum stat))
set variable (currentMP, get hero stat (1,stat:MP,current stat))
set variable (maxMP, get hero stat (1, stat:MP, maximum stat))
set variable (lvl, get hero level (1))
set variable (nxtlvl, get hero level (1)+1)
end
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#Call this script from Hero 1's stats text box.
plotscript, menu3, begin
#Hero in slot 2
set variable (currentHP, get hero stat (2,stat:HP,current stat))
set variable (maxHP, get hero stat (2, stat:HP, maximum stat))
set variable (currentMP, get hero stat (2,stat:MP,current stat))
set variable (maxMP, get hero stat (2, stat:MP, maximum stat))
set variable (lvl, get hero level (2))
set variable (nxtlvl, get hero level (2)+1)
end
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#Call this script from Hero 2's stats text box.
plotscript, menu4, begin
#Hero in slot 3
set variable (currentHP, get hero stat (3,stat:HP,current stat))
set variable (maxHP, get hero stat (3, stat:HP, maximum stat))
set variable (currentMP, get hero stat (3,stat:MP,current stat))
set variable (maxMP, get hero stat (3, stat:MP, maximum stat))
set variable (lvl, get hero level (3))
set variable (nxtlvl, get hero level (3)+1)
end
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#Run this script first, to get this to work have menu 0 as a menu that says: "Pause Menu"
#or something like that, have this single caption link to a text box that then opens the real main menu
#and also runs this script.
plotscript, showstats, begin
show text box (45)
show text box (46)
show text box (47)
show text box (48)
run script by id (@menu)
wait for text box
end
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Fri Oct 03, 2008 10:03 am Post subject: |
|
|
You could use strings instead. It's unlikely that multiple text boxes will be supported like you're thinking. _________________
|
|
Back to top |
|
 |
|
|
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
|