Author Topic: Constant animation for Sectopod Routine?  (Read 3496 times)

Offline Wolfstarr

  • Colonel
  • ****
  • Posts: 248
    • View Profile
Constant animation for Sectopod Routine?
« on: May 19, 2018, 02:19:16 am »
Hi everyone,

Any tips on how I can set a unit using the sectopod animation drawing routine to have a constant animation? I can see some rulesets have scripts within their armor routine and wondered if it was something I could replicate?

Warboy, if you read this the helicopter animation routine you added works like a charm in the nightly :) Now have a helicopter patrolling my maps lol

Cheers All :)
« Last Edit: May 19, 2018, 02:29:30 am by SideQuests »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Constant animation for Sectopod Routine?
« Reply #1 on: May 19, 2018, 09:17:44 am »
Whoa... Desert Strike?! :)

Offline Wolfstarr

  • Colonel
  • ****
  • Posts: 248
    • View Profile
Re: Constant animation for Sectopod Routine?
« Reply #2 on: May 19, 2018, 11:12:42 am »
Yeah :)

Warboy added a new routine in the nightly (22) which works perfectly with an amended cyber disc sprite template.

Just trying to get this demon sprite I found to be constantly flapping its wings :)

Read through a script in bulletdesigners 40k but couldn’t work it out lol

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Constant animation for Sectopod Routine?
« Reply #3 on: May 19, 2018, 03:13:37 pm »
First it need Extended version, then to armor rules you need add script that will alter draw behavior:
Code: [Select]
armors:
  - type: TANK_ARMOR
    drawingRoutine: 20
    movementType: 1
    spriteSheet: FDEAMON.PCK
    scripts:
      selectUnitSprite: |
        var int temp;
        var int walking;
        var int floating;
        unit.isWalking walking;
        unit.isFloating floating;
        if and eq walking 0 eq floating 1;
          unit.getId temp;
          offsetmod temp 11 0 8; #desync animation of different units
          add temp anim_frame;
          wavegen_saw temp 4 4 4;
          add sprite_offset 1;
          add sprite_offset temp;
          add sprite_index sprite_offset;
        else;
          add sprite_index sprite_offset;
        end;
        return sprite_index;
Demon will flip wings only when he is in air.

Offline Wolfstarr

  • Colonel
  • ****
  • Posts: 248
    • View Profile
Re: Constant animation for Sectopod Routine?
« Reply #4 on: May 19, 2018, 04:00:10 pm »
Thanks Yankes :)

I take it there isn’t a way to this in nightly without OXCE? The sprite doesn’t really have a walking animation so would like to have wings flapping all the time.

EDIT: I got it working, turns out the Xarquid routine works great :) had to drop a frame of animation but it does work exactly as I wanted!
« Last Edit: May 20, 2018, 12:24:41 am by SideQuests »