gametechmods

Robot Arena => General Support => Topic started by: GroudonRobotWars on July 07, 2011, 12:26:29 AM

Title: Lowering the drop speed of the RW Pit.
Post by: GroudonRobotWars 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.
Title: Re: Lowering the drop speed of the RW Pit.
Post by: Enigm@ on July 07, 2011, 12:28:55 AM
check some stuff in the bindings.
Title: Re: Lowering the drop speed of the RW Pit.
Post by: JoeBlo on July 07, 2011, 07:41:05 AM
Since when are arena's AI'd?
Title: Re: Lowering the drop speed of the RW Pit.
Post by: Avalanche on July 08, 2011, 10:29:09 AM
Hi thar py.
Im guessing thats where it is, no exact clue.
Title: Re: Lowering the drop speed of the RW Pit.
Post by: Trovaner 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.
Title: Re: Lowering the drop speed of the RW Pit.
Post by: GroudonRobotWars on July 08, 2011, 04:32:49 PM
If it will make it descend slower than I will do that.
Title: Re: Lowering the drop speed of the RW Pit.
Post by: Trovaner 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...
Title: Re: Lowering the drop speed of the RW Pit.
Post by: JoeBlo 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..
Title: Re: Lowering the drop speed of the RW Pit.
Post by: Trovaner 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?).
Title: Re: Lowering the drop speed of the RW Pit.
Post by: Clickbeetle 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).
Title: Re: Lowering the drop speed of the RW Pit.
Post by: Serge on July 10, 2011, 08:17:06 AM
If you want an object to be unaffected by gravity, set its mass to 0.