Setting Screen Entry Points: Difference between revisions
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:SCI Pages]] | [[Category:SCI Pages]] | ||
[[Category:Temp SCI Pages]] | [[Category:Temp SCI Pages]] | ||
[[Category:SCI Pages to be Edited]] | |||
<div align="center"><span style="font-size: 22pt">Setting Screen Entry Points</span><br />''By [[Shane Cloud]]''</div> | |||
<br /> | |||
==<br /> Introduction == | |||
When moving Ego from one room to another, if you want the last position reflected you will need to use it as the variable. | When moving Ego from one room to another, if you want the last position reflected you will need to use it as the variable. | ||
Line 18: | Line 23: | ||
To make an actor chase Ego from one room to the next and appear in this same position, use a global variable, then depending on if the variable is set to true or false init the following character in the particular rooms otherwise simply don't init the character. | To make an actor chase Ego from one room to the next and appear in this same position, use a global variable, then depending on if the variable is set to true or false init the following character in the particular rooms otherwise simply don't init the character. | ||
==<br /> References == | |||
<references /> | |||
==<br /> Related Links == | |||
* | |||
| | ||
[[Category:Actors]] | [[Category:Actors]] | ||
[[Category:SCI Actors]] | [[Category:SCI Actors]] |
Latest revision as of 17:25, 30 April 2025
Introduction
When moving Ego from one room to another, if you want the last position reflected you will need to use it as the variable.
For instance this code is directly from one of my games. room 500 is the inventory screen, and when you return from it you need to be in the exact spot that you left. room 3 is adjacent to the room so some variables need to stay the same like the egos y position and loop, but not all of them as you see I manually set the x. Anyway, hope this little snippet helps clear up your question.
(switch(gPreviousRoomNumber)
(case 500 (send gEgo:view((send gEgo:view))loop((send gEgo:loop))posn((send gEgo:x) (send gEgo:y))init()))
(case 3 (send gEgo:view((send gEgo:view))loop((send gEgo:loop))posn(45 (send gEgo:y))init()))
(default(send gEgo:view((send gEgo:view))posn(170 130)loop(2)init()))
) // end switch
To make an actor chase Ego from one room to the next and appear in this same position, use a global variable, then depending on if the variable is set to true or false init the following character in the particular rooms otherwise simply don't init the character.
References
Related Links