• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Mac OSX Issues with Platformer Engine

Z

ZeroHP

Guest
I downloaded a Platformer Engine and I'm trying to make some changes. I made a second character and I don't know how to apply some of the scripts to my new object as well as the original object the scripts already apply to. Here they are:

/*
0: Number of pixels above the collision rectangle to check for a collision
with the character.
*/
//the solid must be hitting the character's bottom side, so...
oCharacter.tempId=id;
with (oCharacter) {
calculateCollisionBounds();
//if there is a collision with tempId on the character's bottom side
return collision_line(round(lb),round(bb+argument0-1),round(rb-1),round(bb+argument0-1),tempId,1,1);
}
return 0;


-----------------------------

/*
0: Number of pixels above the collision rectangle to check for a collision
with the character.
1: Id to use instead of the characters. Optional. Used e.g. when we need to check for a particular character.
*/
//the solid must be hitting the character's bottom side, so...
oGame.collisionTempId=id;
w=argument1;
if ((argument1==0) or (argument1==noone)) {w=oCharacter;}
with (w) {
calculateCollisionBounds();
//if there is a collision with tempId on the character's bottom side
if (collision_line(round(lb),round(bb+argument0-1),round(rb-1),round(bb+argument0-1),oGame.collisionTempId,1,1)>0) {
return 1;
}
}
return 0;
 
Top