FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Pages: 1 2 [3]

Author Topic: Basics of instance and object manipulation  (Read 8739 times)

Niektory

  • Newbie
  • Posts: 29
    • View Profile
Re: Basics of instance and object manipulation
« Reply #30 on: December 24, 2012, 01:18:45 am »

The last argument determines how much of the original color remains. It's in the 0~255 range, use 0 to replace the original color completely:
Code: [Select]
addColored(instance, 255, 210, 0, 0)
Logged

Kresp

  • Newbie
  • Posts: 22
    • View Profile
Re: Basics of instance and object manipulation
« Reply #31 on: December 24, 2012, 02:00:32 am »

Thanks.
Logged

Kresp

  • Newbie
  • Posts: 22
    • View Profile
Re: Basics of instance and object manipulation
« Reply #32 on: December 26, 2012, 01:37:01 am »

Code: [Select]
cellgrid = self._model.getCellGrid('hexagonal')
cellgrid.thisown = 0
cellgrid.setRotation(0)
cellgrid.setXScale(1)
cellgrid.setYScale(1)
cellgrid.setXShift(0)
cellgrid.setYShift(0)
layer = self._map.createLayer('ground_layer', cellgrid)
layer.setPathingStrategy(fife.CELL_EDGES_AND_DIAGONALS)
layer.setLayerTransparency(1)
Resulting layer doesn't render any objects than i add later. What do i miss?

UPD: figured out. Had to use addActiveLayer for a new layer.
« Last Edit: December 26, 2012, 02:23:18 am by Kresp »
Logged
Pages: 1 2 [3]