Is it possible to update the Ladder and Water Packs?

Cobra Blade

  • *
  • Posts: 63
The Ladder and Water Packs was a great kit that really helped me created my game for Stencyl 2.2.
Unfortunately it was never updated beyond that version, is there any way to update it for Stencyl 4.x?
Jon and captaincomic tried helping back in Stencyl 3.0, but it looks like that forum post has since vanished, so I'll have to start over with trying to get it to work in Stencyl 4.x.

So the first error I get if I try to compile my game is from the Event Splash in Underwater
Code: [Select]
if(!_CreateSplash || _WaterRegion.getName().charAt(5) == "X") return;
for(var i:int=0; i<(_NumberofSplashParticles+1); i++)
{
    //createActor(getActorType(119),actor.getXCenter(),_WaterRegion.getY()-(_WaterRegion.getHeight()/2), FRONT);
    createActor(_SplashActorType,actor.getXCenter(),actor.getYCenter(), FRONT);
}

merrak suggested to replace the "for(var i:int=0; i<(_NumberofSplashParticles+1); i++)" with "for ( i in 0..._NumberofSplashParticles + 1 )"

This then let me get a little further with Stencyl then stopping the Create Event in Ladder Regions
Code: [Select]
//Get all "Ladder" regions in the scene
var tempRegList:Array = getAllRegions();
for each(var oneReg:Region in tempRegList)
{
    if(oneReg.getName().substring(0,6) != "Ladder")
    {
        continue;   
    }
    _RegionList.push(oneReg);
}

merrak helped out again by suggesting to replace "for each(var oneReg:Region in tempRegList)" with "for ( oneReg in tempRegList )"

This then let me progress to the next hurdle, Ladder Regions again but the Event Updated

This was a Code block that had
Code: [Select]
for each(_CurrentRegion in _RegionList) {
Ginge suggested replacing "for each(_CurrentRegion in _RegionList) {" with "for( _CurrentRegion in _RegionList ) {"

So a little more progress made once again, next up Water Regions under the Create Event
Code: [Select]
//Get all "Water" regions in the scene
var tempRegList:Array = getAllRegions();
for each(var oneReg:Region in tempRegList)
{
if(oneReg.getName().substring(0,5) != "Water")
{
continue;
}
_RegionList.push(oneReg);
}

Well, this looks identical to the Create Event in Ladder Regions I had earlier that merrak helped out with, so I replace the "for each(var oneReg:Region in tempRegList)" with "for ( oneReg in tempRegList )"

This lets us progress to Water Regions and the Updated Event and its code block
Code: [Select]
for each(_CurrentRegion in _RegionList) {
Likewise this looks identical to what Ginge helped out with earlier so I'll replace "for each(_CurrentRegion in _RegionList) {" with "for( _CurrentRegion in _RegionList ) {"

This in turn made Stencyl throw a wobbly, and it is now complaining about these three sections all at once.

You have the Splash Event again from Underwater
Code: [Select]
if(!_CreateSplash || _WaterRegion.getName().charAt(5) == "X") return;
for ( i in 0..._NumberofSplashParticles + 1 )
{
//createActor(getActorType(119),actor.getXCenter(),_WaterRegion.getY()-(_WaterRegion.getHeight()/2), FRONT);
createActor(_SplashActorType,actor.getXCenter(),actor.getYCenter(), FRONT);
}

The Create Event from Ladder Regions
Code: [Select]
//Get all "Ladder" regions in the scene
var tempRegList:Array = getAllRegions();
for ( oneReg in tempRegList )
{
if(oneReg.getName().substring(0,6) != "Ladder")
{
continue;
}
_RegionList.push(oneReg);
}

and the Create Event from Water Regions
Code: [Select]
//Get all "Water" regions in the scene
var tempRegList:Array = getAllRegions();
for ( oneReg in tempRegList )
{
if(oneReg.getName().substring(0,5) != "Water")
{
continue;
}
_RegionList.push(oneReg);
}


I'm no coder, so am left really helpless. Can anyone spot what went wrong or what needs to change.
I've got this fully finished Stencyl project from 2013 that I just can't compile due to this.  :'(
So any help is greatly appreciated.

merrak

  • *
  • Posts: 2696
Do you have a sample project that uses this behavior?

Cobra Blade

  • *
  • Posts: 63
Thanks again for your help so far merrak, I'll strip down my game to demo size and share that on here so you can get a better look.

Cobra Blade

  • *
  • Posts: 63
Sorry, even after trimming out levels and some other stuff, it is still pretty big.
Hope it's still okay.
https://dl.dropbox.com/s/dhrsg35iwfnjr1x/ladderwaterdemo.zip?dl=1

Cobra Blade

  • *
  • Posts: 63
Akemi was able to update Ladder and Water Packs, I'm not sure if there is any demand for it anymore, but I know back when Stencyl 3 1st came out, others were also looking for an update so they could compile their Stencyl 2 projects in 3.
So I'll attach it here.