Hi all! I'm brand freakin' new to RMVX Ace, but I have a background in Java, JS, Python, and C/C++ (and very, very rudimentary experience with Ruby - specifically Rails), to give a perspective of my knowledge in attempting to help me here. Also, this is my first post on the forums, so feel free to move this and call me bad things or something if it's in the wrong spot.
I'm attempting to create an event in which the player chops down a tree. Since the trees I'm using span across several tiles (I hope I'm using correct or understandable terminology) and events can only occupy one, I've run into the problem of turning the tree into a stump.
The bottom tile of the tree is just fine. It's an event that changes its self-switch A under the right conditions, causing its graphic to change to a stump. Whoo! But now I have the top of the tree floating over the stump. I turned to scripting because that seems to be my answer to a lot of things, and I really think it's viable here.
What I want to do:
Thanks in advance! Google brought me here six or seven times, and I hadn't found what I was looking for.
(Update: I'm using VX Ace. I didn't specify that well enough in the original post. Sorry!)
I'm attempting to create an event in which the player chops down a tree. Since the trees I'm using span across several tiles (I hope I'm using correct or understandable terminology) and events can only occupy one, I've run into the problem of turning the tree into a stump.
The bottom tile of the tree is just fine. It's an event that changes its self-switch A under the right conditions, causing its graphic to change to a stump. Whoo! But now I have the top of the tree floating over the stump. I turned to scripting because that seems to be my answer to a lot of things, and I really think it's viable here.
What I want to do:
- Calculate the X- and Y-coordinate of the tree top using the map coordinates of the tree base
- Access the event at the calculated X and Y
- Modify self-switch "A" of that event, removing its graphic (using an event page, which I've already set up anyway)
- The event signifying the bottom of the tree, which successfully turns into a stump under the right conditions
- Three map variables: the tree base's X, the tree base's Y, and the equivalent of (the tree base's Y) minus 1
- Is there a Ruby object containing all of the data about a given event?
- Is there a way to retrieve an event that occupies a given map coordinate?
- Can I modify the self-switch of this retrieved event using the script?
- Am I over-thinking the crap out of this?
Thanks in advance! Google brought me here six or seven times, and I hadn't found what I was looking for.
(Update: I'm using VX Ace. I didn't specify that well enough in the original post. Sorry!)