Community

SCI Programming => Mega Tokyo SCI Archive => Topic started by: RJD on May 16, 2004, 02:26:04 PM

Title: Diagonal Views
Post by: RJD on May 16, 2004, 02:26:04 PM
I have drawn diagonal views for a secret project, but do not know how to incorporate them into my game.  What script would I change and what would I change in it?
Title: Re:Diagonal Views
Post by: Nychold on May 17, 2004, 07:43:03 PM
Wow, I thought there was a solution already posted here, but I guess not.  An attempt was made here (http://www.mega-tokyo.com/forum/index.php?board=5;action=display;threadid=5029), but a minor typo led to an unsolved mystery (Cloudee, & and | are bitwise functions...you needed to use or and and).  Some correct (and relatively accurate) code is provided below:

Code: [Select]
     (if ((<=(send client:heading) 22) or  (>=(send client:heading)337))(send client:loop(3)))
      (if ((>=(send client:heading) 23) and (<=(send client:heading) 67))(send client:loop(5)))
      (if ((>=(send client:heading) 68) and (<=(send client:heading)112))(send client:loop(0)))
      (if ((>=(send client:heading)113) and (<=(send client:heading)157))(send client:loop(7)))
      (if ((>=(send client:heading)158) and (<=(send client:heading)202))(send client:loop(2)))
      (if ((>=(send client:heading)203) and (<=(send client:heading)247))(send client:loop(6)))
      (if ((>=(send client:heading)248) and (<=(send client:heading)292))(send client:loop(1)))
      (if ((>=(send client:heading)293) and (<=(send client:heading)336))(send client:loop(4)))

Replace this with "DirLoop(...)" in cycle.sc.  The loops 4, 5, 6, and 7 represent upper left, upper right, lower left, and lower right respectively.  Feel free to change the loops to whatever you want.  Hope this helps!
Title: Re:Diagonal Views
Post by: RJD on May 18, 2004, 04:03:23 PM
Thanks.  I got it working!  The views are used at the wrong times, where he will do the moonwalk, etc, but that will be easy to fix.  Thanks!

Edit:  It works fine now, but it looks akward when Ego stops walking and has a leg in the air, etc.  I looked through the forums, but apparently nobody's asked about idle views.  I know its been done, in LockerGnome Quest and many Sierra SCI games, but..how?
Title: Re:Diagonal Views
Post by: Nychold on May 18, 2004, 09:43:19 PM
Download the source code to LockerGnome Quest, and look in Cycle.sc.  There's an extra class at the end called StopWalk.  Start there.
Title: Re:Diagonal Views
Post by: RJD on May 21, 2004, 02:09:56 PM
I've copied n pasted the StopWalk code from LockerGnome, but it doesnt seem to do anything.  Is it supposed to work, or do I need more directions?  Remember, I need idle views for all 8 directions.
Title: Re:Diagonal Views
Post by: Nychold on May 22, 2004, 01:13:02 PM
You have to set your actors' and/or ego's cycler to StopWalk, instead of Walk.  ie:

(send gEgo:setCycle(StopWalk 1))

And there are some other, smaller details, but I'll let you figure them out.  :D
Title: Re:Diagonal Views
Post by: RJD on May 22, 2004, 02:03:05 PM
Well, I got that fixed, thanks to Nychold, but now I have yet another question.  I know I'm probably being a bit annoying with all these questions....
I don't recall having seen this done in any SCI0 games before, but it is in nearly all VGA games.  I want the Ego to turn as he walks.  For example:  Ego is facing east, and player clicks to west of him.  I want Ego to face directly front or back and then a diagonal view inbetween these two side views.  Do you guys understand my question?  Has this been done before in an EGA game?
Title: Re:Diagonal Views
Post by: Doan Sephim on May 22, 2004, 11:23:20 PM
i think that that was done in quest for glory 2, but i definately dont know how you'd go about pulling it off...sorry. anyone else have an idea?