PDA

View Full Version : Solidity Without Changing Combos - Possible?



C-Dawg
05-13-2008, 11:46 AM
Title says it all. Can we manipulate the solidity of combos on the screen without changing the underlying combo? Better yet, can we manipulate the solidity of 1/4 combos?

What I'd like to do with this, if its possible, is change my freeze ray script so that it doesn't draw an ice block. Instead, it changes solidity of the 1/4 combos immediately under an enemy to solid for the duration of the freeze. Havn't taken a crack at this yet, but I wondered if it was even worth it.

Joe123
05-13-2008, 12:09 PM
Yes, solidity of combos is handled via a bitmask.
The function's in ZScript.txt.

C-Dawg
05-13-2008, 12:11 PM
Right, but when I change the solidity of a combo, it's persistent until I change it back, right?

Joe123
05-13-2008, 12:12 PM
I would assume so, I don't see any other way of it working.

When you change Screen->ComboF[], it doesn't change back until you tell it to.
I don't see why Screen->ComboS[] should work any differently.

Not that I've actually used it (directly) though.

C-Dawg
05-13-2008, 12:39 PM
Well, I'll mess around with it tonight and find out.

ScaryBinary
05-13-2008, 03:52 PM
See:
ComboS[i] (http://www.shardstorm.com/ZCwiki/Screen_%28ZScript%29#int_ComboS.5Bi.5D)
Determining Combo Walkability (http://www.shardstorm.com/ZCwiki/Bitwise_operators#Determining_Combo_Walkability)

To make a portion of the combo solid, you would use a Bitwise OR (http://www.shardstorm.com/ZCwiki/Bitwise_operators#Bitwise_OR). Something like:
Screen->ComboS[1] = Screen->ComboS[1] | 0x0001; would make the top-left square of the combo solid and leave the other three corners unchanged.

To make a portion of the combo walkable, you would do something like this (I think...:)):
Screen->ComboS[1] = Screen->ComboS[1] & ~0x0001;
That makes the top-left square of the combo walkable but leaves the other three corners unchanged.

What I'm not sure of (and I think this is maybe what your original question was) is if this affects every combo on every screen that has the same ID as the one specified by Screen->ComboS[i], or if it only affects that particular combo on that screen....?

Joe123
05-13-2008, 05:46 PM
Screen->ComboS only specifies one combo =S

Screen->ComboS[ComboAt(x,y)]
How can it affect more than one combo?

ScaryBinary
05-13-2008, 06:28 PM
Screen->ComboS only specifies one combo =S

Screen->ComboS[ComboAt(x,y)]
How can it affect more than one combo?

I don't know if it can :shrug:. I'm only curious becuase if you look at the description for the new Game->SetComboSolid (http://www.shardstorm.com/ZCwiki/Game_%28ZScript%29#SetComboSolid) function, that does affect all combos everywhere in the game, even though you give the function a combo on a particular screen.

I suppose it would be a pretty simple experiment to create a single screen with multiple instances of the same combo, then change the walkability of one of the combos and see if the others change too. But I have to go eat supper now. :D

Master Maniac
05-13-2008, 06:56 PM
the comboAt thing could just say "the ID of the combo at these coordinates"

which would be just like putting a combo ID there anyway. i don't see what makes it any different.