Vehicle as "touch" NPC
Moderators: Bob the Hamster, marionline, SDHawk
- Willy Elektrix
- Liquid Metal Slime
- Posts: 910
- Joined: Sun Aug 15, 2010 11:30 pm
Vehicle as "touch" NPC
Is there anyway to have a boat vehicle act as a "touch" NPC instead of a "use" NPC? The problem is, you can't touch an NPC through a wall, therefore you can't touch the boat through the shoreline. However, for reasons of consistency, I want to make the boat function like a touch NPC.
Is there a way around this?
Is there a way around this?
- FnrrfYgmSchnish
- Metal Slime
- Posts: 721
- Joined: Thu Jun 18, 2009 4:37 am
- Location: Middle of Nowhere, VA
It's possible to set up "A" and "B" vehicle tiles; just push A or B when you're hovering over a spot in the wallmap editor. Maybe you could try removing the wall that keeps you from touching the boat, then putting one of those types of tiles on the shore (where you can walk) and setting the boat to be blocked by that type of tile.
Then you'd just need a way to keep the heroes from walking out into the water; a blank NPC that's set to "use," does nothing, and only appears if a certain tag is off should work for that. Just make sure the boat is set to turn that tag on whenever you're riding it. Of course, this wouldn't work so well if you can get on the boat from A LOT of different places (I was thinking of something like a "you can only get on the boat from ports/docks" sort of thing when I typed this up, not a "you can get on the boat from any shoreline tile" sort of thing.)
I don't know if you're already using the vehicle tiles or not (if so this may not work so well!), but they're kind of an odd little feature that I can imagine people forgetting about, so I figured I'd mention them.
Then you'd just need a way to keep the heroes from walking out into the water; a blank NPC that's set to "use," does nothing, and only appears if a certain tag is off should work for that. Just make sure the boat is set to turn that tag on whenever you're riding it. Of course, this wouldn't work so well if you can get on the boat from A LOT of different places (I was thinking of something like a "you can only get on the boat from ports/docks" sort of thing when I typed this up, not a "you can get on the boat from any shoreline tile" sort of thing.)
I don't know if you're already using the vehicle tiles or not (if so this may not work so well!), but they're kind of an odd little feature that I can imagine people forgetting about, so I figured I'd mention them.
Last edited by FnrrfYgmSchnish on Tue Oct 01, 2013 7:37 pm, edited 2 times in total.
FYS:AHS -- Swapping out some step-on NPCs for zones + each step script
Puckamon -- Not until the reserve party is expanded.[/size]
Puckamon -- Not until the reserve party is expanded.[/size]
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
- Spoonweaver
- Liquid Metal King Slime
- Posts: 6247
- Joined: Mon Dec 08, 2008 7:07 am
- Location: Home
- Contact:
The clear solution in my opinion is to have a beach tile where the boat the hero and both walk. Problem solved.
Another solution, requiring lite scripting, would be it have 1 script run when you exit the boat, that makes the tile the boat is currently on no longer have a wall map. And another script that runs when you board the boat that makes the tile currently under the boat have the proper wallmap.
Then you just need to remove the wall under the first boat and you're all set.
Each script would be basically 1 line long.
Another solution, requiring lite scripting, would be it have 1 script run when you exit the boat, that makes the tile the boat is currently on no longer have a wall map. And another script that runs when you board the boat that makes the tile currently under the boat have the proper wallmap.
Then you just need to remove the wall under the first boat and you're all set.
Each script would be basically 1 line long.
- Willy Elektrix
- Liquid Metal Slime
- Posts: 910
- Joined: Sun Aug 15, 2010 11:30 pm
All of your ideas are good. I'm not sure how I will resolve this, but you've given me a place to start.
Mogri wrote:You could use a script to selectively remove walls next to the boat.
When you use a script to edit a wallmap, does the wallmap stay changed even when you save and reload the game?Spoonweaver wrote:Another solution, requiring lite scripting, would be it have 1 script run when you exit the boat, that makes the tile the boat is currently on no longer have a wall map. And another script that runs when you board the boat that makes the tile currently under the boat have the proper wallmap.
Then you just need to remove the wall under the first boat and you're all set.
Each script would be basically 1 line long.
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
- Willy Elektrix
- Liquid Metal Slime
- Posts: 910
- Joined: Sun Aug 15, 2010 11:30 pm
Code: Select all
plotscript, boatmount, begin
write pass block(npc X(170),npc Y(170),15)
endIf I were to use this method, how would I prevent the hero from entering the water?Spoonweaver wrote:The clear solution in my opinion is to have a beach tile where the boat the hero and both walk. Problem solved.
For instance, I can make a B tile (for mounting vehicle B) that prevents the boat from leaving the "beach" and going on land. But how do I make a wall that will let the boat pass from the beach to the water, but will not let the hero walk from the beach to the water?
- Spoonweaver
- Liquid Metal King Slime
- Posts: 6247
- Joined: Mon Dec 08, 2008 7:07 am
- Location: Home
- Contact:
- Willy Elektrix
- Liquid Metal Slime
- Posts: 910
- Joined: Sun Aug 15, 2010 11:30 pm
I think I found a bug. If you are using a "touch" NPC boat, when you run into a regular wall, the heroes dismount. The same thing happens if you touch a touch-to-use NPC, even if the "enable NPC activation" vehicle bitset is on.
Last edited by Willy Elektrix on Sat Oct 05, 2013 8:33 pm, edited 1 time in total.
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact: