gametechmods
Robot Arena => General Support => Topic started 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.
-
check some stuff in the bindings.
-
Since when are arena's AI'd?
-
Hi thar py.
Im guessing thats where it is, no exact clue.
-
Open up the file named 'DSLRWarena.py' and find this section inside of the Tick method.
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.
-
If it will make it descend slower than I will do that.
-
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:
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...
-
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..
-
Opps, misread it twice... I guess my multitasking strategy isn't working as well as I had thought it would...
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?).
-
Opps, misread it twice... I guess my multitasking strategy isn't working as well as I had thought it would...
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
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).
-
If you want an object to be unaffected by gravity, set its mass to 0.