gametechmods

Robot Arena => General Support => Topic started by: cephalopod on November 01, 2009, 01:18:03 PM

Title: How to place/move hazards (like flame jets) in arenas?
Post by: cephalopod on November 01, 2009, 01:18:03 PM
Sorry to sound n00by, I just can't work it out :3

Thanks guys :D
Title: How to place/move hazards (like flame jets) in arenas?
Post by: Madiaba on November 01, 2009, 01:55:11 PM
Craaig:
The gmf usually deals with the 'objects' of the arena.
The py usually deals with the 'dynamics' of the arena.
So,
1. Make a BU of the original file you're about to mod.
2. Open the arena.py.
3. Paste these blue lines under each section/heading as listed (being careful of spacing).
 
Code: [Select]
   def HazardsOn(self, on):
        if on:
[COLOR=#0000ff]          self.flame_TEST = Hazards.Flame((0, .1, 0), (0, 0.1, 0), (.2, .4, .2), .8)[/COLOR]
[COLOR=blue]          self.AddHazard(self.flame_TEST)[/COLOR]
 
 
    def Tick(self):
[COLOR=blue]      self.flame_TEST.Tick()  [/COLOR]
[COLOR=blue]      self.flame_TEST.FlameOff() # Must add or else will keep adding flames and lag.[/COLOR]
[COLOR=blue]      self.flame_TEST.FlameOn()    [/COLOR]
 

Here how to adjust it's parameters:
# EXPLANATION: self.flame_TEST= Hazards.Flame((XYZ Flame Location), (XYZ Flame Direction), (XYZ Flame size), where damage happens)
 
 
BTW:Note that only the upper part of the flame causes damage, as is...
 
.
Title: How to place/move hazards (like flame jets) in arenas?
Post by: cephalopod on November 01, 2009, 02:14:09 PM
Aah, I see.

Thanks Mad :D