Jump to content

Photo

Why is ComboAt bugged?

ComboAt Bugged

  • Please log in to reply
5 replies to this topic

#1 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 02 November 2016 - 11:28 PM

for some reason comboAt is returning a low number when I am on the bottom of the screen

and when it does this it only decrements and interments when I move down or up.

here is my script

 

Spoiler

Edited by Shadowblitz16, 02 November 2016 - 11:30 PM.


#2 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 03 November 2016 - 11:41 PM

ComboAt() isn't bugged. But I do see a flaw in one of your if statements.

if (Game->GetComboFlag(Game->GetCurMap(), Game->GetCurScreen(), ComboPos) == 9 || 26 || 27 || 10 || 8 )
You have to paste the entire check for each one of these. ZScript doesn't let you chain ORs like you were trying here. It looks at the first one, where you check if the return value of GetComboFlag() is equal to 9, and then looks at the number 26 on its own. Since any number other than 0 is typecast to "true", that if statement will always be true. If you want to shorten the statement, you could do something like this:

combo_flag = Game->GetComboFlag(Game->GetCurMap(), Game->GetCurScreen(), ComboPos);
if (combo_flag == 9 || combo_flag == 26 || combo_flag == 27 || combo_flag == 10 || combo_flag == 8 )
Although, since you're looking at the current screen, Screen->ComboF[ComboPos] would work just as well.

#3 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 04 November 2016 - 12:20 AM

ok thankyou Lejes



#4 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 04 November 2016 - 01:23 PM

@Lejes

 I realized I was checking for flags instead of types decide 

also do push combos types change before they move? if so then that could be a problem

 

Edit :

it still does the miscalculation

when I print the X and Y variables those they either return in pixels,  tiles, or rows. depending on what side of the screen I'm on

 

here is my code

Spoiler

Edited by Shadowblitz16, 04 November 2016 - 02:03 PM.


#5 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 12 November 2016 - 04:42 AM

I believe that push combos update after Waitdraw(), but experimentation is highly advised in this regard. You can check Screen->MovingBlock* to determine if they are being pushed.



#6 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 27 December 2016 - 02:49 PM

@ZoriaRPG what does Screen->MovingBlock do?

also how do I use it I don't see it listed on the zc wiki


Edited by Shadowblitz16, 27 December 2016 - 02:49 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users