iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!
 
Reply to this topicStart new topic
> [-system-] Lake Event, Go for a swim or fish on the edge!
Alt_Jack
post Aug 31 2011, 11:25 PM
Post #1



Group Icon


Type: Undisclosed
Alignment: Chaotic Neutral




This one's done via pictures, so that I don't have to write much out (I'll get enough of that in Pathophysiology II dry.gif )
What it does is it uses coordinate-based variables to create a perimeter around a body of water (think of it as an invisible fence) and when the player steps into that range it brings up the choice of whether to fish or swim in the lake (or get out, depending on direction). The fishing CE isn't included; that's up to the player to make. This is actually only 2 parallel process events. The first one is a CE you can use, while 3-5 are one event. There's more, since you have to build the same condition branch system for the other 3 edges of the lake.
The nice part is that you can do this on any part of the lake (except the corners, since that's 8d movement) so you don't need to make any carefully positioned events.

Spoiler:
CODE
-parallel process event-
*for player location*

control variables x - player's map X
control variables y - player's map y
*tracks where you are on the map in real-time*
condition branch- switch- swimming = ON
control switches fishing OFF
*it's one or the other, you can't do both at the same time*
set move route - player (wait)
-through ON
-change blending: add
*you can put in a swimming graphic change here, too*

-Else-
condition branch- switch - swimming - OFF
control switches - fishing = ON
set move route - player (wait)
-change blending normal
-through OFF

branch end
=======================

-parallel process-
*the event itself*
*establish your coordinate points and write them down in comment boxes*
condition branch variable y = ***
-condition branch x = ***
- (nothing, since you're on a corner, which only applies with 8d movement)
condition branch variable x = ***
- (nothing again, the other corner)
condition branch variable x = greater than/equal to ***
-condition branch variable x = less than/equal to ***
(this range is the shore edge)
--condition branch- player is facing down (towards the water)
- control switches - swimming OFF
condition branch fishing = ON (you're more likely to fish than swim, but just in case...)
set move route- player- repeat (no waiting) - wait 999 frames
(this fixed a bug in the engine I was using where the player would move when you selected stuff in the menu)
show choices - swim, fish, nothing
-when fish- call (whatever your fishing CE is)
-when swim- (recheck the coordinate range, Y and both X, and direction)
--set move route - player (wait)
-direction fix off
-through on (so you can move in the water)
- 1 step forward (into the water, which is why you have to be facing it, which is why we checked and re-checked the direction)
-control switches- swimming = ON (make sure that if one is off, the other is on, and vice versa)
-control self-switch A ON (no idea why this is on)

-else-
text: I can't swim here!
control switches (swimming off, fishing on again)
when nothing
set move route- player (wait)
turn 180 (away from the water, so that it doesn't activate)

-else- player is facing up (away from the water)
control switches (swimming OFF, fishing ON)

branch end

(congrats, you've finished programming one edge of the lake. Just follow the same format of checking player co-ords and turning switches and move routes on or off)


This post has been edited by Alt_Jack: Sep 3 2011, 09:23 PM


--------------------
Go to the top of the page
 
+Quote Post
   
Celianna
post Sep 2 2011, 03:40 PM
Post #2



Group Icon


Type: Artist
Alignment: Chaotic Evil




I recommend learning how to take screenshots of your monitor.

I'm also really confused with the coordinates since you didn't explain that part at all.
Go to the top of the page
 
+Quote Post
   
Neosky
post Sep 2 2011, 04:03 PM
Post #3


Master of the DarkSyde of Cheese!
Group Icon


Type: Undisclosed
Alignment: Lawful Evil




yeah can you explain a little more? Just having the screenshots isn't really helping since they are just random shots. Maybe make a small outline:

Spoiler:


like this does this blah
Attached File  1.PNG ( 221.44K ) Number of downloads: 25


Blarg blarg
Attached File  2.PNG ( 356.23K ) Number of downloads: 11


honk honk.
Attached File  3.PNG ( 558.2K ) Number of downloads: 10


Then blah blah.


This is what I'm having a problem with....



Also use Prt Scrn. print screen to takes shots of everything.

not sure where it is on your keyboard cause there are too many types. but there is always a print screen.


Also one question, with Through = on do you have events that make on contact do something? cause you can't barrier a person with Through = on.


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


Remember, Remember the 5th of November...
Spoiler:



If you are new, please go through this spoiler for VERY useful links.
Spoiler:





Tarris Thread || User Forum || Tarris Hold Website || Twitch.tv
Go to the top of the page
 
+Quote Post
   
Alt_Jack
post Sep 3 2011, 08:40 PM
Post #4



Group Icon


Type: Undisclosed
Alignment: Chaotic Neutral




QUOTE (Celianna @ Sep 2 2011, 10:40 AM) *
I recommend learning how to take screenshots of your monitor.

I know how to take screenshots, they just didn't come out well. dry.gif They were meant to be temporary anyway.
What happened was that I'd written it all out, then the stupid server timed out, and logged me out (just as I submitted it, no less) so I lost half an hour of typing and didn't have time to do the rest. I'll fix that ASAP and just write it out.
QUOTE
I'm also really confused with the coordinates since you didn't explain that part at all.

I'm not surprised; it's rather difficult to explain. The coordinates create an outline ( not a physical barrier) around the rectangular lake. It's just a grid zone created using numbers/variables, like using plotted coordinate points to draw a square on graphing paper, except that you're drawing a square around a smaller square. It's also a question of where you are and which way you're facing. There's a seperate parallel process that keeps track of your X/Y coordinates while you walk around the map. If those numbers fall within a certain range, it activates.

QUOTE
-land-
[*1]-[2]-[3]-[4]-[5*] -water's edge-
-water-

Yeah, again, senseless. Okay, Picture a 5x5 meter pool with numbered tiles around it (like above) , and flags* on each corner. Obviously, you can't jump off where the flags are (squares 1 and 5) , nor can you jump off if you're not facing the water, or if you're not on the pool's edge (squares 2-4). If you're on the edge (2-4)facing the opposite direction of the water, it's assumed that you just got out of the water, so it deactivates "through" . It plots all of this out (it's actually 4 times as long) , which is why I can't fit it into screen shots. As always, it's easier to watch it work, instead.

http://www.youtube.com/watch?v=pyC0CF_vPIs...feature=related
Like I said, way too complicated to explain in words. I'm just glad it's in the demo. http://www.mediafire.com/?z6rneqqps66xqv5

QUOTE
Also one question, with Through = on do you have events that make on contact do something? cause you can't barrier a person with Through = on.

The water is what you can't get past. They don't make contact with anything but the water, which is where "through" comes into play. It turns through on so that you can move around ( "swim" ) in the normally impassable lake (2 minutes into the vid). You can't normally walk on water, but if through is on, it's no problem. It stays on the entire time that you're in the water area, but once you get back up onto the shore, it deactivates itself. You can see that happen when the blending turns off after the player gets out (2:06).

I'm really sorry, but I can't really explain it much clearer than that. sad.gif

This post has been edited by Alt_Jack: Sep 3 2011, 08:54 PM


--------------------
Go to the top of the page
 
+Quote Post
   
Neosky
post Sep 3 2011, 08:57 PM
Post #5


Master of the DarkSyde of Cheese!
Group Icon


Type: Undisclosed
Alignment: Lawful Evil




Ohhh, I just read through it again and noticed that this was a Tut?? I thought you were asking a question, lol. Interesting setup with the cords and such. Just work on your Tutorial Layout and this could be well worth it!


Sorry, wink.gif


Try looking at mine, I'd have to say it's probably the best idiot proof tut, bias I know, but serious it's simple, lol.

http://www.rpgmakervx.net/index.php?showtopic=36623


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


Remember, Remember the 5th of November...
Spoiler:



If you are new, please go through this spoiler for VERY useful links.
Spoiler:





Tarris Thread || User Forum || Tarris Hold Website || Twitch.tv
Go to the top of the page
 
+Quote Post
   
Alt_Jack
post Sep 3 2011, 09:30 PM
Post #6



Group Icon


Type: Undisclosed
Alignment: Chaotic Neutral




QUOTE (neosky @ Sep 3 2011, 02:57 PM) *
Ohhh, I just read through it again and noticed that this was a Tut?? I thought you were asking a question, lol. Interesting setup with the cords and such. Just work on your Tutorial Layout and this could be well worth it!


Yea, they're usually way too complicated to be tutorials, but I find them a nice change from cooking/mining/forestry events.
No offence, of course; a lot of people make them. XP


--------------------
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: 31st July 2014 - 08:47 PM

RPGMakerVX.net is an Privacy Policy, Legal.