Submit Your Article Guild Wars 2 Forum
RPG Maker VX
 
Gallery Members Search Calendar Help


Join the Guild Wars 2 Forum Community!

Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Invisibility Potion, Ending it when a timer hits 0.
moonshineguy
post Feb 8 2010, 06:34 PM
Post #1



Group Icon

Posts: 17
Type: Designer
Alignment: Chaotic Good




I've been trying to set up a potion that makes the player invisible, allowing them to walk past enemies undetected (like the repellent in pokemon).

I've gotten as far as

____________________________________________

Control Timer: Startup (0 min. 30 sec.)
Change Encounter: Disable
Change Transparency: Transparent
Control Switches: [0054:invisible] = ON
Loop
Conditional Branch: Timer 0 min 1 sec or more

Else
Control Timer: Stop
Change Encounter: Enable
Change Transparency: Normal
Control Switches: [0054:invisible] = OFF
Break Loop

Branch End

Repeat Above

___________________________________________________

But this only manages to crash the system, freezing everything.
I assume there is an error in my entry, or maybe my computer is intolerant of loops...
If you can do this without loops... or labels... that'd be cool =P otherwise, have any idea what's up?

I haven't edited my scripts at all... wonder if changing anything in there would help out...


--------------------
[I'll try anything once...]

~Dfrods42
Go to the top of the page
 
+Quote Post
   
HJS
post Feb 8 2010, 07:53 PM
Post #2


Old member, New Worker
Group Icon

Posts: 361
Gender: Male
Type: Coder
Alignment: Lawful Good




how did you setted the common event? by calling it or with a switch?


--------------------
RMXP is better than RMVX

They're Both Kool!
Go to the top of the page
 
+Quote Post
   
moonshineguy
post Feb 8 2010, 08:26 PM
Post #3



Group Icon

Posts: 17
Type: Designer
Alignment: Chaotic Good




QUOTE (HJS @ Feb 8 2010, 02:53 PM) *
how did you setted the common event? by calling it or with a switch?


I called it via the item.


--------------------
[I'll try anything once...]

~Dfrods42
Go to the top of the page
 
+Quote Post
   
Omegas7
post Feb 8 2010, 10:05 PM
Post #4


Epic
Group Icon

Posts: 1,594
Type: Designer
Alignment: Chaotic Evil




It's the loop - Loops will repeat the block of commands ignoring absolutely everything else. In fact, if a loop is running, that way you did, the player wouldn't be even able to walk.

------

Try instead doing this:

CODE
Create Item -> Link to common event ->
{ Turn [Invisible] ON
   Set Timer to 0:30
   Player: Semi/Transparent (Make more sense if semi-transparent)   }

Create another common event:
{ Trigger: Parallel    Switch: [Invisible]
   If Timer is 0...
   Turn [Invisible] OFF
   Player: Back to normal    }


This post has been edited by Omegas7: Feb 8 2010, 10:07 PM


--------------------

Spoiler:
Play Fallington now!
Spoiler:
Do something awesome and receive the greatest honor ever: Omegas7's seal of Awesomeness.
Spoiler:
These people officially deserve it:
Spoiler:
Malexos x 1 (Winter 2010 Olympics Contest)
MetryoV x 1 (Winter 2010 Olympics Contest)
Touchfuzzy x 1 (Leaving Admin position = Lowering rmvx.net's defenses for me to conquer)

Bulletxt x 1 (SwaptXT)
Go to the top of the page
 
+Quote Post
   
moonshineguy
post Feb 9 2010, 12:45 AM
Post #5



Group Icon

Posts: 17
Type: Designer
Alignment: Chaotic Good




QUOTE (Omegas7 @ Feb 8 2010, 05:05 PM) *
It's the loop - Loops will repeat the block of commands ignoring absolutely everything else. In fact, if a loop is running, that way you did, the player wouldn't be even able to walk.

------

Try instead doing this:

CODE
Create Item -> Link to common event ->
{ Turn [Invisible] ON
   Set Timer to 0:30
   Player: Semi/Transparent (Make more sense if semi-transparent)   }

Create another common event:
{ Trigger: Parallel    Switch: [Invisible]
   If Timer is 0...
   Turn [Invisible] OFF
   Player: Back to normal    }


Thank You!


--------------------
[I'll try anything once...]

~Dfrods42
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 9th September 2010 - 03:30 AM

RPGMakerVX.net is an Privacy Policy, Legal.