Jump to content

Announcing our new website

To find out the latest about our new website, visit Game Dev Unlimited

- - - - -

Auto-Fade Script


  • You cannot reply to this topic
15 replies to this topic

#1 Lizzie S

    Legendary

  • RMXPU Legend
  • PipPipPipPipPipPipPip
  • 1,624 posts

Posted 08 September 2010 - 05:45 PM

Okay, I am not too keen on the User Submitted Scripts area, but this is posted there as well. At any rate, here is an Auto-Fade script. Should help make the transferring of the player somewhat easier. I know not everyone uses a 'fade' mechanic, so I didn't want to just edit the original 'Transfer Player' button.


Now, the instructions are in the header of the script. Further, I included a demo as well. If I could, I'd include a screenshot, but that would do little justice, if any at all.
Without further ado, here be the script:

Spoiler

Attached Files



#2 CrimsonInferno

    Child of the North . ∙ : ∙ . ¤

  • Member
  • 2,072 posts

Posted 08 September 2010 - 05:50 PM

Wow! Awesome script, Leon! I'm gonna test it! It would be a lot easier I think lol

*reppies!*

#3 Lizzie S

    Legendary

  • RMXPU Legend
  • PipPipPipPipPipPipPip
  • 1,624 posts

Posted 08 September 2010 - 06:51 PM

Certainly hope it helps out.

#4 CrimsonInferno

    Child of the North . ∙ : ∙ . ¤

  • Member
  • 2,072 posts

Posted 08 September 2010 - 07:25 PM

:o

I get an error. Maybe I'm doing it wrong? >.>

#5 Kiriashi

    Activity Whore

  • RMXPU Legend
  • PipPipPipPipPipPipPipPipPipPip
  • 4,486 posts

Posted 08 September 2010 - 07:59 PM

He can't help you unless you show him the error, hun.

Leon, I'm going crazy right now 'cause I can't test this out. xD
I guess I just have to wait till I get back.

#6 CrimsonInferno

    Child of the North . ∙ : ∙ . ¤

  • Member
  • 2,072 posts

Posted 08 September 2010 - 08:44 PM

Oh, right, sorry >.>

Posted Image

:o

(Has never really gotten into a script before or scripting at all lol)

#7 Lizzie S

    Legendary

  • RMXPU Legend
  • PipPipPipPipPipPipPip
  • 1,624 posts

Posted 08 September 2010 - 09:16 PM

interesting error... are you trying to transfer during the Title Scene?

#8 CrimsonInferno

    Child of the North . ∙ : ∙ . ¤

  • Member
  • 2,072 posts

Posted 08 September 2010 - 09:19 PM

Nope. I wouldn't even know how to do that :>

I'm testing out the beginning of my game by having a small scene of a forest and then it transfers to another scene for a movie and then the player gets to move. But when I start the game up with the script, that error pops up and then shuts my game down lol

#9 Lizzie S

    Legendary

  • RMXPU Legend
  • PipPipPipPipPipPipPip
  • 1,624 posts

Posted 08 September 2010 - 09:29 PM

Well, I have just updated it so it will work in any Scene. Just a change in syntax.

#10 CrimsonInferno

    Child of the North . ∙ : ∙ . ¤

  • Member
  • 2,072 posts

Posted 08 September 2010 - 09:53 PM

What is a Syntax...? >.>

Alright, I'll try it out!

EDIT:
Now its all black. Maybe I'm doing something wrong....?

Edited by CrimsonInferno, 08 September 2010 - 10:00 PM.


#11 Lizzie S

    Legendary

  • RMXPU Legend
  • PipPipPipPipPipPipPip
  • 1,624 posts

Posted 08 September 2010 - 10:02 PM

let me see your event code? what you are using, the entire window. (yes, redundant)

I forgot! I should mention in the instructions, when it says this:
# So, a command should look like this:
# t = Tone.new(-100, -100, -255, 0)
# Move.xfer(1, 7, 10, 6, t)


the t = Tone.new(x, y, z, a)


That is the Tone of the screen where you are transferring TO. It automatically fades to black.
I should have specified that, and I am sorry.

#12 CrimsonInferno

    Child of the North . ∙ : ∙ . ¤

  • Member
  • 2,072 posts

Posted 08 September 2010 - 10:17 PM

Ah, I see :P Its cool, others probably already knew, I just don't know anything about scripting. :sweatdrop: I'm gonna learn it soon, when my game at least has a near point of a demo lol

How do I set up this in the script command window?
"# Move.xfer(1, 7, 10, 6, t)"

#13 Lizzie S

    Legendary

  • RMXPU Legend
  • PipPipPipPipPipPipPip
  • 1,624 posts

Posted 09 September 2010 - 01:23 AM

For the command window, you use:
  t = Tone.new(r, g, b, a)
  Move.xfer(map_id, new_x, new_y, facing, t)
 

But, you define the: r, g, b, a, map_id, new_x, new_y, facing. The 't' is the tone above it. And, that tone will be the tone of the next map you go to. You need both lines, but you have to define all those variables. Sounds hard, but it is kind of simple. Like in the example:
t = Tone.new(-100, -100, -255, 0)
Move.xfer(1, 7, 10, 6, t)

I defined the t to be that particular tone (it will have no blue, just be a darker yellow), then the next map they move to would be the map with the id of 1, they'd be at x location 7, y location 10, and facing right. It sounds complex, I know... but when you get it down, it is quite easy.

#14 CrimsonInferno

    Child of the North . ∙ : ∙ . ¤

  • Member
  • 2,072 posts

Posted 09 September 2010 - 02:20 AM

Oh I see. But to find the rest of the map numbers, you'd have to appoint with variables, right? To find the "X" location and the "Y" location....?

#15 Lizzie S

    Legendary

  • RMXPU Legend
  • PipPipPipPipPipPipPip
  • 1,624 posts

Posted 09 September 2010 - 02:21 AM

I believe so, if i understand you correctly. You just have to put in the variables, and it will transfer.

I hate to get off topic, but have you an IM? If so, you can pm it to me, cuz this would be a lot easier to explain that way.

#16 CrimsonInferno

    Child of the North . ∙ : ∙ . ¤

  • Member
  • 2,072 posts

Posted 09 September 2010 - 10:23 PM

Should be simple then! :D

Thanks, Leon! :P





0 user(s) are reading this topic

members, guests, anonymous users