
ok, thank you for your feedback! Glad I can profit from experienced coders' knowledge on this forum.
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
function room_Load()
{
SetTimer(1, 1);
}
function room_RepExec()
{
intChickenRun = Random(2);
if (IsTimerExpired(1)){
if (intChickenRun !=0) {
SetTimer(1, 45);
bool found;
int x,y;
cChicken.UnlockView();
if (!cChicken.Moving) {
while(!found) {
x = Random(Room.Width);
y = Random(Room.Height);
if (Region.GetAtRoomXY(x, y) == region[1]) found = true;
}
cChicken.Walk(x, y, eNoBlock);
}
}
else if (intChickenRun ==0) {
SetTimer(1,38);
cChicken.LockView(25);
cChicken.Animate(Random(3), 4, eOnce, eNoBlock);
}
}
}
function room_RepExec()
{
intChickenRun = Random(2);
if (intChickenRun !=0) {
bool found;
int x,y;
if (!cChicken.Moving) {
while(!found) {
x = Random(Room.Width);
y = Random(Room.Height);
if (Region.GetAtRoomXY(x, y) == region[1]) found = true;
}
cChicken.Walk(x, y);
}
}
else if (intChickenRun ==0)
{
cChicken.LockView(25);
cChicken.Animate(Random(3), 5, eOnce); //chicken has 3 animations to chose from: picking a corn to the left or to the right or just standing still)
cChicken.UnlockView();
}
}
// room script file
function room_FirstLoad()
{
// close door on startup when entering the room (0 = closed; 1 = open; 2 = closed & locked)
set_door_state(21, 0);
init_object(21, oDoor.ID);
}
function hDoor_AnyClick()
{
if (any_click_on_door_special(21, oDoor.ID, 75, 175, eDir_Left, 1, 280, 260, eDir_Down, null, null, 4, 0)==0) Unhandled();
}
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.074 seconds with 14 queries.