PDA

View Full Version : ComboD[] Read-only??



ShadowMancer
08-08-2007, 11:16 PM
I just tried to change a combo by setting ComboD[] but nothing happened visually anyways, the script I have checks if the combo in front of Link is a certain ID then does [some stuff] then (should) change the combo. enerything else works fine, but the combo stays the same, the strange thing is when I try to activate the script again on the same combo it does nothing, as if its ID changed but it still looks the same (yes I checked layers and stuff like that)

pkmnfrk
08-08-2007, 11:43 PM
How are you accessing it? You should use the ComboAt() function, which takes pixels:


if(Screen->ComboD[ComboAt(Link->X, Link->Y)] == 5) Screen->ComboD[ComboAt(Link->X, Link->Y)] = 6

ShadowMancer
08-09-2007, 12:04 AM
here is a code snippet:



if (Link->Dir == 0) {
xx = Link->X;
yy = Link->Y-8;
}
if (Link->Dir == 1) {
xx = Link->X;
yy = Link->Y+16;
}
if (Link->Dir == 2) {
xx = Link->X-16;
yy = Link->Y;
}
if (Link->Dir == 3) {
xx = Link->X+16;
yy = Link->Y;
}
if (Link->InputR && can_lift(xx,yy)==true && is_hold == false)
{
//Main Action Loop

//assumes the shape of the rock
this->Data = Screen->ComboD[ComboAt(xx,yy)] + 20;
this->CSet = Screen->ComboC[ComboAt(xx,yy)];
//Changes Rock to undercombo
Screen->ComboD[ComboAt(xx,yy)] = under;


the varible under is set in: void run(int under)
like I said every other part of the script runs exactaly as it should, I know ComboD[] should change the combo if written to..

ShadowMancer
08-09-2007, 03:49 PM
Duh, I figured out what I was doing wrong it WAS layers after all, for some odd reason I had Layer 0 and Layer 1 set to the same map so layer 1 just covered up layer 0 and ComboD[] only changes layer 0, so.. yay almost ready to release a pickup rock script (just a few graphical bugs to hammer out)