[Feature Request] Platform Interruption

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
Assmaster
Posts: 14
Joined: Wed Aug 06, 2003 1:58 am
Location: New York City
Contact:

[Feature Request] Platform Interruption

Post by Assmaster »

I dont know how difficult (or possible) it is to implemet this. But I think it would be really great if there were some way to interrupt a raising or lowering sector before it finishes its movement. I realize there are methods you could use to try and simulate this. But depending on the situation, they may fail.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Code: Select all

script 100 (int tag, int inc, int wait, int count) {
   // tag is tag of sector to move, inc is amount of units to move each
   // iteration, wait is how long to wait between iterations.
   // count is the number of iterations (floor will move count * inc units if
   // the script is not interrupted)
   int i;
   for (i = 0; i < count; i++) {
      FloorRaise(tag, inc, inc*1000);
      delay(wait);
   }
}

script 101 (void) {
   ACS_terminate(100);
}
Standard disclaimer: I have no idea if those are the right function names, as I don't use ACS.
Assmaster
Posts: 14
Joined: Wed Aug 06, 2003 1:58 am
Location: New York City
Contact:

Re: [Feature Request] Platform Interruption

Post by Assmaster »

Ahem...
Assmaster wrote: I realize there are methods you could use to try and simulate this. But depending on the situation, they may fail.
I tried something very similar to what you suggested (using both a for loop and a simple restart with a var decrementation). It was in a stuation where the player could use something in order to activate the appropriate scripts. But if they mashed the use key fast enough the platform would raise and lower inappropriately.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Then you did it wrong... :?
User avatar
cccp_leha
Posts: 1816
Joined: Wed Jul 16, 2003 7:21 am
Location: NJ, USA
Contact:

Post by cccp_leha »

Have you tried floor_cruchStop() (just in case)? If not that, have one sidedef of the plat sector reference a dummy sector outside that map, which has its floor height changed as needed. That should make the plat stop at proper places, and it isn't really a workaround.
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Post by Lexus Alyus »

I'm sure you could just use a certain command to just stop it dead when you pushed a switch or something... although I don't really see what use it would be...

:twisted:
Post Reply

Return to “General”