Announcement
Announcement
| 2nd Quarter Contest Announcement posted! See the Community Announcements section. |
![]() ![]() |
Mar 11 2012, 04:21 PM
Post
#1
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
![]() I was wondering if someone could make a script that would allow for when events are placed beside each other, a conditional branch be triggered in one of the events. Could someone make the script to allow for directional conditioning as well (2=up, 4=left, 6=right, 8=up, 5=any direction)? This script could be used to create in-game customisable circuits. Eg. This event is next to event 1, this event is facing up, event 1 is facing left: CODE @>Conditional Branch: Script: ev(0,1,8,4) Eg. Event 1 is next to event 2, event 1 is facing left, event 2 is facing right: CODE @>Conditional Branch: Script: ev(1,2,4,6) Eg. Event 1 is next to event 2, event 1 is facing down, event 2 is facing in any direction: CODE @>Conditional Branch: Script: ev(1,2,2,5) Image for comparison: Spoiler: EDIT: I'm using FlipelyFlip's Event Cloning Script 1.1 & Sky00Valentine's Room Decoration Script 1.1, is there a way to make it compatible? Decoration Script: Spoiler: Event Cloning: Spoiler: This post has been edited by Safebox: May 8 2012, 08:16 AM -------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Mar 18 2012, 09:47 PM
Post
#2
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
BUMP
added images -------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Mar 19 2012, 04:03 AM
Post
#3
|
|
![]() Behold. Me. ![]() Type: Coder Alignment: Chaotic Evil |
According to your format:
CODE ev(0,1,8) You want to check if event 0 (in this case, the player) is facing north, and check if event 1 is north as well (next to event 0)? -------------------- ![]() |
|
|
|
Mar 19 2012, 07:29 AM
Post
#4
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
What about it?
0 represents "This event" not "Player" This post has been edited by Safebox: Mar 19 2012, 05:49 PM -------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Mar 19 2012, 05:48 PM
Post
#5
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
Oh, here's the new format of what I meant:
Eg. This event is next to event 1, this event is facing up, event 1 is facing left: CODE @>Conditional Branch: Script: ev(0,1,8,4) Eg. Event 1 is next to event 2, event 1 is facing left, event 2 is facing right: CODE @>Conditional Branch: Script: ev(1,2,4,6) Eg. Event 1 is next to event 2, event 1 is facing down, event 2 is facing in any direction: CODE @>Conditional Branch: Script: ev(1,2,2,5)
-------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Mar 20 2012, 02:20 AM
Post
#6
|
|
![]() Behold. Me. ![]() Type: Coder Alignment: Chaotic Evil |
What about it? It is called clarification. You're supposed to say "yeah, you're right" or "no, it is wrong". Anyway, taking a look at your latest format, I guess this should do: CODE def ev(source,target,sourceDirection,targetDirection) sourceID = source; sourceID = @event_id if source == 0 sourcePosition = [$game_map.events[sourceID].x,$game_map.events[sourceID].y] targetPosition = [$game_map.events[target].x,$game_map.events[target].y] if ((sourcePosition[0] == targetPosition[0]) && ((sourcePosition[1] - targetPosition[1]).abs == 1)) || ((sourcePosition[1] == targetPosition[1]) && ((sourcePosition[0] - targetPosition[0]).abs == 1)) if ($game_map.events[sourceID].direction == sourceDirection) && ($game_map.events[target].direction == targetDirection) return true end end return false end You use it by doing a Conditional Branch, script mode, and line is just like your examples: CODE ev(0,1,8,4) "This event is next to event 001, this event faces north, and that event faces west" CODE ev(3,6,6,8) "Event 003 is next to event 006, event 003 faces east, and that event faces north" -------------------- ![]() |
|
|
|
Mar 20 2012, 06:15 AM
Post
#7
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
So the purpose of the numbers is just the same as I requested?
2=\/ 4=< 6=> 8=^ 5=O 0=this event or is it slightly different? EDIT: Ok thanks! I appreciate it! EDIT2: Is there a way to make it compatible with Sky00Valentine's Decoration Script (or FlipelyFlip's Event Cloning script)? Decoration Script: Spoiler: Event Cloning: Spoiler: This post has been edited by Safebox: Mar 20 2012, 03:20 PM -------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Mar 20 2012, 11:12 PM
Post
#8
|
|
![]() Behold. Me. ![]() Type: Coder Alignment: Chaotic Evil |
So the purpose of the numbers is just the same as I requested? Yes, fortunately you used the standard way of describing those directions. Is there a way to make it compatible with Sky00Valentine's Decoration Script (or FlipelyFlip's Event Cloning script)? State the exact nature of the problem. -------------------- ![]() |
|
|
|
Mar 21 2012, 05:56 AM
Post
#9
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
Sky00Valentine's Decoration Script allows you to build by cloning events from another map & placing them on the current one. When an object is cloned to the current map it loses its Event ID (I think anyway). Which is why the script becomes virtually redundant when the event is cloned, because it becomes a "ghost" of itself.
-------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Mar 24 2012, 11:12 AM
Post
#10
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
BUMP
-------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Apr 5 2012, 02:49 PM
Post
#11
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
BUMP
Please tell me this can be done -------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Apr 7 2012, 04:23 AM
Post
#12
|
|
![]() Behold. Me. ![]() Type: Coder Alignment: Chaotic Evil |
Apologies, I forgot this existed. I can't check it out right now, and I will probably be away for some days. I will take a look sometime later.
-------------------- ![]() |
|
|
|
Apr 7 2012, 03:06 PM
Post
#13
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
Thats ok
-------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Apr 15 2012, 10:11 AM
Post
#14
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
I am going to BUMP this topic 3 more times. After that a Moderator can close it :/
-------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Apr 15 2012, 06:44 PM
Post
#15
|
|
![]() Meowthos the zombie cat!! ![]() Type: Coder Alignment: Lawful Good |
I'm taking a look at this, I'll let you know what I can do / if it can be done in the next day or two
-------------------- I've been away for a while. Here's my really quite old stuff
Spoiler: |
|
|
|
Apr 16 2012, 03:50 PM
Post
#16
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
Ok tahnks
-------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Apr 21 2012, 04:40 PM
Post
#17
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
B to the U to the MP!
BUMP -------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Apr 21 2012, 06:21 PM
Post
#18
|
|
![]() Behold. Me. ![]() Type: Coder Alignment: Chaotic Evil |
Thank you mithos. I'll forget about this now.
-------------------- ![]() |
|
|
|
Apr 21 2012, 09:07 PM
Post
#19
|
|
![]() 8 People | 1 Name - Pushing the boundaries of RPG Maker VX! ![]() Type: Spriter Alignment: Lawful Neutral |
...can you not at least try as well? because I mean, you ARE one of the best script writers on the VX community
This post has been edited by Safebox: Apr 21 2012, 09:07 PM -------------------- I support:
Spoiler: Favorite Quotes: Spoiler: |
|
|
|
Apr 21 2012, 11:16 PM
Post
#20
|
|
![]() Meowthos the zombie cat!! ![]() Type: Coder Alignment: Lawful Good |
Okay I have a couple of ways I can do this, not sure which you want.
One way would be to set up your events as normal, with a couple of changes to the script, meaning that when you copied events, every copy (for example) of event 1 would check every copy of event 2 etc. => not exactly what I thought you had in mind. Another would be, rather than using event IDs as you are, is there any reason you shouldn't use event x,y coordinates. So for example, event 1 could check the current state of the event at 7,3; and use that result. If desired I could even make the coordinates relative to the event doing the checking (so 1,0 would check the square immediately to the right of the event doing the checking) -------------------- I've been away for a while. Here's my really quite old stuff
Spoiler: |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 24th May 2013 - 08:19 PM |
|
|