 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
MultiColoredWizard Come back, baby! The Breastmaster

Joined: 01 Feb 2003 Posts: 1232
|
Posted: Wed Dec 31, 2003 1:34 pm Post subject: Wiz needs help. FAST. |
|
|
Okeeey, if any of you know me very well, then you'd know that I am the worst programmer EVAR, so here's Wiz asking for help.
Basically.. I have no idea what to do.
So.. I want to have a day night sequence, with multiple maps.
All right.. so let's say the hero's at X26 and Y30. I want his position to be checked there, then a text box displayed (4), then after closing the text box, transported to the next map and put in the same position. |
|
Back to top |
|
 |
Me HI.

Joined: 30 Mar 2003 Posts: 870 Location: MY CUSTOM TITLE CAME BACK
|
Posted: Wed Dec 31, 2003 2:05 pm Post subject: |
|
|
Okay.
Code: | Script, gotonight, begin
suspend player
varible(myx) #these will store your position
variable(myy)
variable(currmap)
currmap := current map
myx := herox(me)
myy := heroy(me)
Show text box (4)
Wait for text box
if(currmap == day map) then(Teleport to map(night map, myx, myy))
else(teleport to map(day map, myx, myy))
resume player
end |
There ya go. That should work. Check my if-then-elses, though. _________________ UP DOWN UP DOWN LEFT LEFT RIGHT RIGHT A B START |
|
Back to top |
|
 |
Setu_Firestorm Music Composer

Joined: 26 Mar 2003 Posts: 2566 Location: Holiday. FL
|
|
Back to top |
|
 |
MultiColoredWizard Come back, baby! The Breastmaster

Joined: 01 Feb 2003 Posts: 1232
|
Posted: Fri Jan 02, 2004 8:44 pm Post subject: |
|
|
It's not what I want. The problem with Moogle's script is that it ONLY changes the colors. I don't want that, plus I can't afford it. I want the maps to change. I don't care about the color. Changing from day to night is gameplay (and story, sort of) related, not graphic related, as Moogle's script is set as.
And Me's doesn't work.. next. :/ |
|
Back to top |
|
 |
planethunter Lost In Emotion

Joined: 07 Jul 2003 Posts: 258 Location: Éire
|
Posted: Sat Jan 03, 2004 2:11 pm Post subject: |
|
|
you could just use the relatively new command: alter tileset, which is particularly useful for dramatic events which effect the tilesets... (such as a fire that damaged all the houses in a village for example.)
the only downside is the tiles that are effected are for every tile on the map... (all the houses graphics on the world map in the example would be affected, not just the village ones) there are ways around this...
by having the effected and uneffected tiles in the same set for example... but that lessens the amount of tiles. _________________ ~PH
 |
|
Back to top |
|
 |
fyrewulff Guest
|
Posted: Sat Jan 03, 2004 3:10 pm Post subject: erererere |
|
|
Sword of Jade's RTS (mk3) as follows:
Code: | script,resume rts, begin
setvariable(isrunning,true)
while(isrunning == true)
do,begin
waitfortextbox
setvariable(second,second + 01) #increase
if(second == 2)
then,begin
setvariable(second,1)
setvariable(minute,minute + 01)
end #end of then
if(minute == 60)
then,begin
setvariable(minute,0) #sets minutes back
setvariable(hour,hour + 100) #increases hour
end
if(hour == 2500)
then,begin
setvariable(hour,100)
setvariable(day,day+1)
end
if(day == 366)
then,begin
setvariable(day,1)
setvariable(year,year+1)
end
setvariable(currenttime,hour+minute)
if(currenttime==1200)
then,begin
setmaps
changetonoon
end
if(currenttime==1900)
then,begin
setmaps
changetonight
end
if(currenttime==400)
then,begin
setmaps
changetodawn
end
if(currenttime==700)
then,begin
setmaps
changetomorning
end
displaytime
wait(1)
end
end
|
The "change to" scripts look like this:
Code: |
script,changetodawn,begin
waitforhero(me)
suspendplayer
#fadescreenout
playerstodawn
teleporttomap(dawnmap,herox(me),heroy(me))
#fadescreenin
resumeplayer
end |
As you see, there's no reason to store the hero's x and y in a variable when there's already a variable available.
More script fun, you'll also need this
Code: | script,playerstodawn,begin
adjust hero palette(hero:Dogero,1)
adjust hero palette(hero:Mi'la,1)
adjust hero palette(hero:John,1)
adjust hero palette(hero:Paul,1)
end |
of course, you'll need to change the hero names.
Code: | script,adjust hero palette,who,offset,begin
variable(heropos)
set variable(heropos,findhero(who))
if(heropos>=0)
then,begin
setheropalette(heropos,getheropalette(heropos,inside battle)+offset,inside battle)
setheropalette(heropos,getheropalette(heropos,outsidebattle)+offset,outsidebattle)
end
end
|
The setmaps script looks like this:
Code: | script, set maps, begin
dochange := true # default to changing maps
if(currentmap==1,or,currentmap==2,or,currentmap==3,or,currentmap==4)
then,begin
setvariable(noonmap,1)
setvariable(afternoonmap,2)
setvariable(nightmap,3)
setvariable(morningmap,4)
end
if(currentmap==5,or,currentmap==6,or,currentmap==7,or,currentmap==8)
then,begin
setvariable(noonmap,5)
setvariable(afternoonmap,6)
setvariable(nightmap,7)
setvariable(morningmap,8)
end
if(currentmap==9,or,currentmap==10,or,currentmap==11,or,currentmap==12)
then,begin
setvariable(noonmap,9)
setvariable(afternoonmap,10)
setvariable(nightmap,11)
setvariable(morningmap,12)
end
if(currentmap==13)
then,begin
dochange := false #special case! set it so no map reload occurs
pancamera(0,0,0)
end
end |
...okay, I'm confused by my own code.
Anyway, a good example to work off of. Remember that you don't need to store variables that are already there, remember to have functions that are as re-usable as possible, and use the _____ofplay commands to gauge time. |
|
Back to top |
|
 |
Me HI.

Joined: 30 Mar 2003 Posts: 870 Location: MY CUSTOM TITLE CAME BACK
|
Posted: Sat Jan 03, 2004 4:37 pm Post subject: |
|
|
One problem: You've got more than one script, and they're all DEFINITELY over 64 lines.
Um, but thanks for pointing out the whole herox and heroy already being defined thing . . . stupid me not realizing that argh. _________________ UP DOWN UP DOWN LEFT LEFT RIGHT RIGHT A B START |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Jan 03, 2004 6:48 pm Post subject: |
|
|
He said those were Sword of Jades scripts me. And the
adjust hero palette(hero:Dogero,1)
is a dead give aay anyway.
Why would you need suspend and resume player commands in the teleport to night-map script, if theres no wait command and therefore no pause for the player to move around in? _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
fyrewulff Guest
|
Posted: Sat Jan 03, 2004 7:19 pm Post subject: |
|
|
The Mad Cacti wrote: | He said those were Sword of Jades scripts me. And the
adjust hero palette(hero:Dogero,1)
is a dead give aay anyway.
Why would you need suspend and resume player commands in the teleport to night-map script, if theres no wait command and therefore no pause for the player to move around in? |
If you don't do that, the player can get misaligned with the tile grid. |
|
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
|