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

Wiz needs help. FAST.

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
MultiColoredWizard
Come back, baby!
The Breastmaster



Joined: 01 Feb 2003
Posts: 1232

PostPosted: Wed Dec 31, 2003 1:34 pm    Post subject: Wiz needs help. FAST. Reply with quote

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
View user's profile Send private message
Me
HI.




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

PostPosted: Wed Dec 31, 2003 2:05 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Setu_Firestorm
Music Composer




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

PostPosted: Fri Jan 02, 2004 9:14 am    Post subject: Reply with quote

If that doesn't work, Wiz, you could always look at Moogle's scripting for Day-Night sequences.
_________________


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
MultiColoredWizard
Come back, baby!
The Breastmaster



Joined: 01 Feb 2003
Posts: 1232

PostPosted: Fri Jan 02, 2004 8:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
planethunter
Lost In Emotion




Joined: 07 Jul 2003
Posts: 258
Location: Éire

PostPosted: Sat Jan 03, 2004 2:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
fyrewulff
Guest






PostPosted: Sat Jan 03, 2004 3:10 pm    Post subject: erererere Reply with quote

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. Huh?

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

PostPosted: Sat Jan 03, 2004 4:37 pm    Post subject: Reply with quote

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




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Jan 03, 2004 6:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
fyrewulff
Guest






PostPosted: Sat Jan 03, 2004 7:19 pm    Post subject: Reply with quote

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
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