PDA

View Full Version : Is there an easy way to check a screen's combos?



Nimono
10-29-2007, 05:59 PM
Is there an easy way to check a screen's combos when looking for a certain one? I don't want to have to do "if(Screen->ComboD(location))...", I'd rather have just one thing constantly check the various combos on-screen. Is there any way of doing this easily? Or am I gonna have to do it the long and hard way? Thanks in advance.

ShadowMancer
10-29-2007, 07:21 PM
Your gonna havta doit the hard way, but its not all that hard with a for loop:

for (int cmb = 0; cmb < 176; cmb++){
if (Screen->ComboD[cmb] = combo) { Do something; }
}

Although doing this each frame may slow down the game (not sure)

Nimono
10-29-2007, 07:52 PM
Your gonna havta doit the hard way, but its not all that hard with a for loop:

for (int cmb = 0; cmb < 176; cmb++){
if (Screen->ComboD[cmb] = combo) { Do something; }
}

Although doing this each frame may slow down the game (not sure)

I saw that in _L_'s Switch Block script. I figured that's what it did, but wanted to make sure. Thanks! Just so you know, I'm looking for a way to redo my Cane of Somaria script to where you can push the block, use the Cane again, and it'll vanish. (Current script won't do that if you push it.) ..Then I have to find a way to make it work without having to place all the ground on layer 1. >_> (...If only there was an easy way to check for a combo right when pushing the block so its ID can be stored somewhere... But I haves a plan.) Anyways, thanks. :D

ShadowMancer
10-30-2007, 07:52 PM
Just a thought; you may want to consider useing an FFC for the Cane of Somaria block (and then you can just use an 'enemy damge' script to hurt enemies) Also I wrote a pickupobject script awhile back if you wanted to do a Lttp style block (requires alittle modification, but you are very able :) ) But if you already have it all worked out it would be less hassle (as the FFC version would require an almost total rewrite :eek: ) Good scriptin' to ya