User Tag List

Results 1 to 4 of 4

Thread: Get / Set combo animation settings in ZScript?

  1. #1
    Keese ScaryBinary's Avatar
    Join Date
    Dec 2006
    Age
    49
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    915
    Level
    10
    vBActivity - Bars
    Lv. Percent
    51.68%

    Get / Set combo animation settings in ZScript?

    Is there a way to get / set the following combo properties via ZScript?
    A.Frames
    A.Speed
    A.SkipX
    A.SkipY
    The "cycle" combo

    I can't seem to find anything in std.zh or zscript.txt that allows access to these properties. What I really care about is the cycle combo, but I lumped the other properties in because I didn't see how they could be accessed either.

    Thanks!

  2. #2
    Gel
    Join Date
    Mar 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    408
    Level
    7
    vBActivity - Bars
    Lv. Percent
    32.14%
    Not as far as i know

  3. #3
    Cor Blimey! CJC's Avatar
    Join Date
    Dec 2002
    Location
    Fading into the darkness
    Age
    35
    Posts
    1,398
    Mentioned
    150 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,621
    Level
    25
    vBActivity - Bars
    Lv. Percent
    1.41%
    Was looking into this today for my own reasons, so hopefully this helps.

    Use the screen integer "Screen->ComboD[ComboAt(x,y)]" or "Screen->ComboD[i]" if you're counting combos on the screen (left to right, top to bottom. i==1 is the upper left corner)

    We're going to cycle it by increasing its value.

    Screen->ComboD[ComboAt(x,y)] += 1;

    or however many combos ahead you wish to jump on the combo sheet. If you're jumping backward, use -= #.

    We can use a for loop to count frames to base this on animation... I think. I don't know how animation speed translates to frames, so you'll want to experiment with it.


    EDIT: This'll only work for combos on layer 0. If you want to cycle combos on different layers, you must use a different function:

    int Layer = 4; //Tells the function which layer you're going to cycle.
    int Cycle = 3; //Tells the function how many combos to cycle ahead (or back if negative)
    Game->SetComboData(LayerMap(Layer), LayerScreen(Layer), ComboAt(x,y), Game->GetComboData(LayerMap(Layer), LayerScreen(Layer), ComboAt(x,y)) + Cycle);


    You can replace both ComboAt(x,y) arguments in that mess with their 'i' index if you're after a specific positioned combo on the screen.
    Last edited by CJC; 04-09-2013 at 09:59 PM.

  4. #4
    Keese ScaryBinary's Avatar
    Join Date
    Dec 2006
    Age
    49
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    915
    Level
    10
    vBActivity - Bars
    Lv. Percent
    51.68%

    Smile

    Hmmm...That should work for what I need to do, if I can get my combos arranged the right way. I have a bunch of combos I may need to cycle/change, so ideally I'd want them arranged so that I can just use the same offset for all of them. I'll take a shot at it and see what happens. Thanks for the example!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social