View previous topic :: View next topic |
Author |
Message |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Tue Feb 10, 2009 5:23 pm Post subject: Can someone teach me Sprite Functions? |
|
|
Okay, so I spent some time trying to understand Slices and I realized after a while that I didn't really need to use them (not to mention that it was too much of a headache to learn >_<).
I just want to place an explosion, made of two large enemy sprites onto the screen.
So I thought I would want something like:
Code: |
set variable (Fire 1, load large enemy sprite (0))
set variable (Fire 2, load large enemy sprite (1))
free sprite(Fire 1)
free sprite(Fire 2)
place sprite (Fire 1, 67, -32)
place sprite (Fire 2, 71, 20)
set sprite visible (Fire 1, on)
set sprite visible (Fire 2, on)
#Animation ends and it's time for the fire to go away.
set sprite visible (Fire 1, off)
set sprite visible (Fire 2, off)
|
A point at the error or a tutorial would be greatly appreciated.
[edit]
Also, what do I do with the 'Screen Layouts' in Custom?
Whenever I set sprites up in there, they get cleared on a 'Whenever-Custom-Feels-Like-It' bases :/ |
|
Back to top |
|
 |
Calehay ...yeah. Class B Minstrel

Joined: 07 Jul 2004 Posts: 549
|
Posted: Tue Feb 10, 2009 5:36 pm Post subject: |
|
|
Remove the freesprite commands. Freesprite is removing the enemy sprite you loaded in the previous two lines, making it look like nothing is happening. You could also remove the lines where you set the fire's visibility to on. When you load a sprite, it is on by default.
Quote: | Also, what do I do with the 'Screen Layouts' in Custom?
Whenever I set sprites up in there, they get cleared on a 'Whenever-Custom-Feels-Like-It' bases :/ |
You can't do anything with it yet except test out layouts. From what I hear, eventually this menu will allow us to modify the layouts of the menu screens and create our own layouts that we can load using plotscripting. _________________ Calehay |
|
Back to top |
|
 |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Tue Feb 10, 2009 5:40 pm Post subject: |
|
|
Quote: | Remove the freesprite commands. Freesprite is removing the enemy sprite you loaded in the previous two lines, making it look like nothing is happening. You could also remove the lines where you set the fire's visibility to on. When you load a sprite, it is on by default. |
Oh hey, it works perfectly.
Thanks for the quick response. |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Tue Feb 10, 2009 8:51 pm Post subject: Re: Can someone teach me Sprite Functions? |
|
|
You don't need to mess with sprite visibility either, since the sprites start visible when they are loaded, and freeing them makes them go away.
Code: |
Fire 1 := load large enemy sprite (0)
Fire 2 := load large enemy sprite (1)
place sprite (Fire 1, 67, -32)
place sprite (Fire 2, 71, 20)
#Animation ends and it's time for the fire to go away.
free sprite (Fire 1)
free sprite (Fire 2)
|
Also, the "set variable" command is starting to drive me crazy :) |
|
Back to top |
|
 |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Tue Feb 10, 2009 9:09 pm Post subject: |
|
|
Quote: | You don't need to mess with sprite visibility either, since the sprites start visible when they are loaded, and freeing them makes them go away. |
Oh, the definition seemed kind of weird to me.
Quote: | By default, a sprite is invisible (on), and must be made visible (off) only if you want to hide it. |
Actually, the definition is pretty odd.
Quote: | Also, the "set variable" command is starting to drive me crazy  |
It's just become a habit for me :/ |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Tue Feb 10, 2009 9:24 pm Post subject: |
|
|
TwinHamster wrote: | Actually, the definition is pretty odd. |
Oops! The definition is totally wrong! When I changed it to start newly loaded sprites as visible I forgot to update the documentation! I'll fix it.
TwinHamster wrote: | It's just become a habit for me :/ |
Eh, that's okay. I'm just saying it drives me crazy, that doesn't mean it has to drive you crazy :) |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Wed Feb 11, 2009 12:05 am Post subject: |
|
|
James Paige wrote: | TwinHamster wrote: | It's just become a habit for me :/ |
Eh, that's okay. I'm just saying it drives me crazy, that doesn't mean it has to drive you crazy :) |
Well it's driving me crazy too! Dang users! _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Wed Feb 11, 2009 8:09 am Post subject: |
|
|
The Mad Cacti wrote: | James Paige wrote: | TwinHamster wrote: | It's just become a habit for me :/ |
Eh, that's okay. I'm just saying it drives me crazy, that doesn't mean it has to drive you crazy :) |
Well it's driving me crazy too! Dang users! |
I know! This program would be so much easier to maintain and upgrade if nobody ever actually used it >:) |
|
Back to top |
|
 |
|