Good luck with your game! 
Sounds like my first game but with so much better graphics

Sounds like my first game but with so much better graphics

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
// PICKUP
else if(UsedAction(eGA_PickUp)) {
if(Region.GetAtRoomXY(player.x, player.y)==region[1]&&object[0].X==525)
{
cEgo.FaceObject(oCoconut, eBlock);
cEgo.AddInventory(iCoconut);
}
else if(Region.GetAtRoomXY(player.x, player.y)!=region[1]&&oCoconut.Moving==false)
{
player.Say("cant reach it");
}
else if(Region.GetAtRoomXY(player.x, player.y)==region[1]&&oCoconut.Moving==true)
{
player.Say("cant reach it");
}
else if(Region.GetAtRoomXY(player.x, player.y)!=region[1]&&object[0].X!=525)
{
player.Say("cant reach it");
}
else if(Region.GetAtRoomXY(player.x, player.y)==region[1]&&object[0].X!=525)
{
player.Say("cant reach it");
}
}
function room_RepExec()
{
if(IsTimerExpired(1))
{
oCoconut.Move(513, 384, 80, eNoBlock, eAnywhere);
SetTimer(1, 400);
}
if(IsTimerExpired(2))
{
oCoconut.Move(525, 419, 20, eNoBlock, eAnywhere);
SetTimer(2, 400);
}
}
// PICKUP
else if(UsedAction(eGA_PickUp)) {
if(Region.GetAtRoomXY(player.x, player.y)==region[1]&&Object.GetAtScreenXY(525, 419)==oCoconut)
{
cEgo.FaceObject(oCoconut, eBlock);
cEgo.AddInventory(iCoconut);
}
else if(Region.GetAtRoomXY(player.x, player.y)!=region[1]&&oCoconut.Moving==false)
{
player.Say("cant reach it");
}
else if(Region.GetAtRoomXY(player.x, player.y)==region[1]&&oCoconut.Moving==true)
{
player.Say("cant reach it");
}
else if(Region.GetAtRoomXY(player.x, player.y)!=region[1]&&oCoconut.Moving==true)
{
player.Say("cant reach it");
}
else if(Region.GetAtRoomXY(player.x, player.y)==region[1]&&Object.GetAtScreenXY(525, 419)!=oCoconut)
{
player.Say("cant reach it");
}
if(Object.GetAtScreenXY(525, 419)==oCoconut)
// PICKUP
else if(UsedAction(eGA_PickUp)) {
if(Region.GetAtRoomXY(player.x, player.y)==region[1]&&oCoconut.Animating==false)
{
cEgo.FaceObject(oCoconut, eBlock);
cEgo.AddInventory(iCoconut);
}
else if(Region.GetAtRoomXY(player.x, player.y)!=region[1]&&oCoconut.Animating==false)
{
player.Say("cant reach it");
}
function oCoconut_AnyClick()
{
//LOOK AT
if(UsedAction(eGA_LookAt)) {
player.Say("It's a coconut");
}
// USE
else if(UsedAction(eGA_Use)) {
player.Say("I'd rather pick it up.");
}
// Push
else if(UsedAction(eGA_Push)) {
Unhandled();
}
// Pull
else if(UsedAction(eGA_Pull)) {
Unhandled();
}
// PICKUP
else if(UsedAction(eGA_PickUp)) {
if(Object.GetAtScreenXY(525, 419)==oCoconut)
{
player.Say("Jummy");
cEgo.Walk(525, 419, eNoBlock, eWalkableAreas);
Hunger-=10;
}
else
{
player.Say("help");
}
}
//USE INV
else if(UsedAction(eGA_UseInv)) {
Unhandled();
}
// don't forget this
else Unhandled();
}
function room_Load()
{
short waveX = oWave.X;
short waveY = oWave.Y;
float duration = 3.0;
oWave2.Transparency=20;
oWave.IgnoreScaling = false;
oWave.TweenPosition(duration,85, 639, eLinearTween, eRepeatTween);
oWave2.TweenPosition(duration, 483, 411, eLinearTween, eRepeatTween);
oCoconut.TweenPosition(10.0, 513, 384, eEaseOutTween, eReverseRepeatTween);
}
function room_RepExec()
{
bool found;
int x, y;
if(BoarOut==0)
{
cBoar2.Transparency=100;
}
else if(BoarOut==1)
{
cBoar2.Transparency=0;
}
if(!cBoar2.Moving){
while(!found){
x=Random(Room.Width);
y=Random(Room.Height);
if(Region.GetAtRoomXY(x,y)==region[2])found=true;
}
cBoar2.Walk(x, y, eNoBlock, eAnywhere);
}
}
// room script file
function room_Load()
{
SetTimer(1, 400);
cCrab1.Move (300, 300);
}
function room_RepExec()
{
bool found;
int x, y;
if(!cCrab1.Moving){ //wait for the npc to stop moving !=not
while (!found){
x=Random(Room.Width);
y=Random(Room.Height);
if (Region.GetAtRoomXY(x,y)== region[1])found=true;
}
cCrab1.Walk(x, y, eNoBlock, eWalkableAreas);
}
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.084 seconds with 14 queries.