Author Topic: Lowering the drop speed of the RW Pit.  (Read 1863 times)

Offline GroudonRobotWars

  • Ultra Heavyweight
  • Posts: 2671
  • Rep: 0
    • Groudonrct3
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Lowering the drop speed of the RW Pit.
« on: July 07, 2011, 12:26:29 AM »
Is it possible to lower the speed of when the RW Pit goes down after a bot pushes the pit release, to make it more realistic. I already know how to do the RW Flipper, but was wondering if it was possible to do it with the Pit.

Offline Enigm@

  • convicted sex offender
  • *
  • Posts: 6616
  • Rep: 5
  • :really_makes_you_think:
    • http://www.youtube.com/us
    • View Profile
    • Awards
  • Skype: uncle_slamm
Re: Lowering the drop speed of the RW Pit.
« Reply #1 on: July 07, 2011, 12:28:55 AM »
check some stuff in the bindings.
(◕‿◕✿) discord: uncle_slamm steam: bigmommaprodz #unbanlra2

Offline JoeBlo

Re: Lowering the drop speed of the RW Pit.
« Reply #2 on: July 07, 2011, 07:41:05 AM »
Since when are arena's AI'd?

Offline Avalanche

  • Retired.
  • Ultra Heavyweight
  • Posts: 3107
  • Rep: -34
  • Yeah, I don't know why I'm still here either.
    • View Profile
    • Awards
  • Discord: ThePootisPower#8377
Re: Lowering the drop speed of the RW Pit.
« Reply #3 on: July 08, 2011, 10:29:09 AM »
Hi thar py.
Im guessing thats where it is, no exact clue.
Former DSL HW champion.
Runner-Up in The Cybernetic Colosseum HW division.
Semi-finalist in RNP: Sword of Glory.
Robogames 1 BW Runner-up.
Professional cunt.
Man of a thousand alt accounts.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Lowering the drop speed of the RW Pit.
« Reply #4 on: July 08, 2011, 04:27:16 PM »
Open up the file named 'DSLRWarena.py' and find this section inside of the Tick method.
Code: [Select]
       if self.dropstart >=1:
      self.droptimer +=.5
      if self.droptimer == 8:
          self.SetActive ("fridge", True)
      if self.droptimer == 20:
          self.SetPinned ("fridge", True)
Basically, when a bot enters the zone, self.dropstart goes up by one (the reverse also happens). After that, this section activates and the drop timer starts going up. IIRC, the arena's Tick method is loaded every .25 seconds so droptimer would equal 8 after 4 seconds. All you really need to do is change the 8 to something larger if you want it to activate later. You may also choose to disable or edit the second 'if' statement if you want to change when the fridge stops being movable.

Offline GroudonRobotWars

  • Ultra Heavyweight
  • Posts: 2671
  • Rep: 0
    • Groudonrct3
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: Lowering the drop speed of the RW Pit.
« Reply #5 on: July 08, 2011, 04:32:49 PM »
If it will make it descend slower than I will do that.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Lowering the drop speed of the RW Pit.
« Reply #6 on: July 08, 2011, 05:08:24 PM »
If you want it to drop slower, you need to change gravity. The 8 represents the amount of time before it is dropped (I totally misinterpreted your initial question).

To change gravity, just add something like plus.gravity(0,-7,0) to the __init__ method.

If you are trying to reduce the amount of damage, I would recommend changing the 4 on this line instead:
Code: [Select]
self.SetSubMaterialSound("fridge", "metal", 4.0, "Sounds\\hzd_comp_hit.wav")

I think there is also a code to slow down things inside of the plus module but I'm still trying to work it out...

Offline JoeBlo

Re: Lowering the drop speed of the RW Pit.
« Reply #7 on: July 08, 2011, 10:47:31 PM »
he wants the pit cover to slowly descend, not do anythignt o the drop zone

I had a very brief look but its been a while since I missed with arena py coding so I want to brush up on my skills first..

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Lowering the drop speed of the RW Pit.
« Reply #8 on: July 09, 2011, 04:39:50 AM »
Opps, misread it twice... I guess my multitasking strategy isn't working as well as I had thought it would...

Code: [Select]
prism = self.AddPrismatic("arena_collision", "pitcover", 0, 1, 0, 0, -5, 0)
Its been awhile since I last used prismatcis but I think all you have to do is change the 1 to a smaller value (something like 0.6 maybe?).

Offline Clickbeetle

  • *
  • Posts: 3374
  • Rep: 21
  • In Soviet Russia, bugs stomp YOU!
  • Awards BOTM Winner
    • View Profile
    • Beetle Bros site
    • Awards
Re: Lowering the drop speed of the RW Pit.
« Reply #9 on: July 09, 2011, 05:16:38 PM »
Opps, misread it twice... I guess my multitasking strategy isn't working as well as I had thought it would...

Code: [Select]
prism = self.AddPrismatic("arena_collision", "pitcover", 0, 1, 0, 0, -5, 0)
Its been awhile since I last used prismatcis but I think all you have to do is change the 1 to a smaller value (something like 0.6 maybe?).


No, the prismatic only sets the start/end points, not the speed... there should be a plus.force somewhere...


fakeedit:  Well it's really convoluted but I think I found it.  Open DSLHaz.py, find class PitDropper, and find this line


Code: [Select]
        self.prismatic.SetPowerSettings(0.00001, -580)


The speed is already super slow but you could maybe try lowering it to 0.000005.  But I have a hunch that gravity does most of the work of lowering the pit, which there's nothing you can do about (unless you want the whole arena to have moon gravity).

To lack feeling is to be dead, but to act on every feeling is to be a child.
-Brandon Sanderson, The Way of Kings

Offline Serge

  • *
  • Posts: 1530
  • Rep: 13
    • View Profile
    • http://www.q3k.org/
    • Awards
Re: Lowering the drop speed of the RW Pit.
« Reply #10 on: July 10, 2011, 08:17:06 AM »
If you want an object to be unaffected by gravity, set its mass to 0.
home | twitter | yt | gmf de/compiler | component freedom | xmpp: q3k@q3k.org | email: q3k@q3k.org