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
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
//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
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
//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
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
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
//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
//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.