Swapping closed pits...

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Swapping closed pits...

Post by Trantor »

I'd like to do an effect that makes the player "jump" across a pit. I achieved this by doing the following: SWAP_GLOBAL_FAST all pits, replacing them with a random flooritem, activating a MOVE_PARTY_FORWARD action twice, then replacing the random flooritem again with pits using SWAP_GLOBAL_FAST. Using this method, the pits always return opened, but I'd like closed pits to remain closed as well. Is there any way to achieve this, to make the closed pits "remember" that they are closed? Can I somehow teleport two tiles ahead? I experimented a bit with TELEPORT_PARTY, but the destination seems to be random.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Swapping closed pits...

Post by Gambit37 »

Sounds messy. Instead, i'd use ACTION_LEVITATE and MOVE_PARTY_FORWARD twice.
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Re: Swapping closed pits...

Post by Trantor »

Cool, I obviously missed that action... *sigh*

On to the next stupid question: How do I stop my party levitating?
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Swapping closed pits...

Post by Gambit37 »

The strength of the ACTION_LEVITATE is it's duration. I've found that 1 = 1 tick. I reckon if you set it to 3 or 4 and do a MOVE_PARTY immediately twice, they'll land just fine on the other side :)
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Re: Swapping closed pits...

Post by Trantor »

Hmm, I tried that, no luck - my party keeps on floating and floating, no matter what strength I use...
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Swapping closed pits...

Post by Gambit37 »

Sorry, dunno then. It works for me.
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Re: Swapping closed pits...

Post by Trantor »

Nevermind. I was doing something VERY stupid and totally messed up. It works perfectly fine now. :) Thank you Gambit, and sorry for wasting your time with my stupidity.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Swapping closed pits...

Post by Gambit37 »

Not at all, it's not stupidity -- just lack of knowledge. That's why it's great to have the forum as someone usually has knowledge that the rest of us don't. Knowledge by its self isn't valuable. It must be used (acted on) or shared. :)
Post Reply