Menu

Show posts

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

Messages - Jimmy

#1
SSH, i already figured that out when scorpiopus posted first.

still haven't figured reload...

Anyway: Left click is suppose to be fire.(look). Right click is reloads(walk). I put the objects to 'any click on object' so it would react to all but walk. I didn't put hide player as if you do that, there is no walk cursor.

New problem: The obects won't come up! function room_b() is suppose to make the obects come up, but it doesn't...this happened after i tried to make a 'shortcut' the riskshot.


int shum = 0; //nothing important. Random string
int chooser = 0; //what object is next
int mouse_clicks = 0; //mouse clicks
int gak = 0; //shot
int lives = 5; //lives
int riskshot = 0; //on if shot

function on_mouse_click(int button) {
if (IsGamePaused() == 1) {
// Game is paused, so do nothing (ie. don't allow mouse click)
}
else if (button==LEFT) {
ProcessClick(mouse.x, mouse.y, GetCursorMode() );
mouse_clicks = mouse_clicks + 1; // increasing mouse click counter
if (mouse_clicks < 9) {
PlaySound(1);
}
if (mouse_clicks == 0) {
 SetObjectGraphic(3,10);
 SetCursorMode(MODE_LOOK);
 }
if (mouse_clicks == 1) { //changes graphics with number of
 SetObjectGraphic(3,11);//clicks. Changes the ammo thing.
 }
if (mouse_clicks == 2) {
 SetObjectGraphic(3,12);
 }
if (mouse_clicks == 3) {
 SetObjectGraphic(3,13);
 }
if (mouse_clicks == 4) {
 SetObjectGraphic(3,14);
 }
if (mouse_clicks == 5) {
 SetObjectGraphic(3,15);
 }
if (mouse_clicks == 6) {
 SetObjectGraphic(3,16);
 }
if (mouse_clicks == 7) {
 SetObjectGraphic(3,17);
 }
if (mouse_clicks == 8) {
 SetObjectGraphic(3,18);
   SetTimer(9, 50);
 SetCursorMode(MODE_WALK);
 DisableCursorMode(MODE_LOOK);
 mouse_clicks = 10;
 }

}

else { // right-click, so cycle cursor
 shum = mouse_clicks * 10 + 15;
 SetTimer(9, shum);
 SetCursorMode(MODE_WALK);     //when right clicked re-loads
 DisableCursorMode(MODE_LOOK); //sets the time it takes to reload
 mouse_clicks = 10;  
}
}
// called when a mouse button is clicked. button is either LEFT or RIGHT

function repeatedly_execute() {
if (IsTimerExpired(9)==1){      //when the reload timer is up
 mouse_clicks = 0;
 EnableCursorMode(MODE_LOOK);
 SetCursorMode(MODE_LOOK);
 SetObjectGraphic(3,10);
 }
if (gak == 1){
 gak = 0;
 lives --;
 if (lives == 5) {
   SetObjectGraphic(4,22);
   }
 if (lives == 4) {
   SetObjectGraphic(4,23);
   }
 if (lives == 3) {
   SetObjectGraphic(4,24);
   }
 if (lives == 2) {
   SetObjectGraphic(4,25);
   }
 if (lives == 1) {
   SetObjectGraphic(4,26);
   }
 if (lives == 0) {
   SetObjectGraphic(4,27);
   }
 if (lives < 0) {
   SetObjectGraphic(4,27);
   }
}
}

function room_b() {
 // script for room: Repeatedly execute
if (riskshot == 1){
 if (IsTimerExpired(1) == 1){
   gak = 1;
   riskshot = 0;
   }
 }

if (chooser == 0){          
SetObjectGraphic(0,6);
MoveObjectDirect(0,70,103,1);
SetTimer (1, 80);
riskshot = 1;}  

if (chooser == 1){
SetObjectGraphic(1,6);  
MoveObjectDirect (1,12,103,1);
SetTimer (1, 80);
riskshot = 1;
}

if (chooser == 2) {
 SetObjectGraphic(5, 6);
 MoveObjectDirect (5,219,113,2);
 SetTimer (1,60);
 riskshot = 1;
 }
}
         



function object0_a() {
 // script for object0: Any click on object
SetObjectGraphic(0,8);
MoveObjectDirect (0,68,126,1);
chooser = 2;  
}


function object1_a() {
 // script for object1: Any click on object
SetObjectGraphic(1,8);
MoveObjectDirect (1,13,127,1);
chooser = 3;  
 
}

function room_c() {
 // script for room: Player enters screen (before fadein)
SetCursorMode(MODE_LOOK);  
}



function object4_a() {
 // script for object4: Look at object
 SetTimer(9, 80);
 SetCursorMode(MODE_WALK);
 DisableCursorMode(MODE_LOOK);
 mouse_clicks = 10;  
}
#2
i made the other function, which is separated from the main bit. But when i reload it doesn't go back to normal, Even when i press left mouse again!
#3
I've already got something in repeatedly. I tried to switch them but still the same.

This is a small bug but it bugs me all the same.
#4
thx to scorp for helping last time.
Anyway, when i press the right mouse button, it changes to walk cursor and starts a timer. When the timer expires it is suppose to change back to look cursor. But it doesn't unless i press the left mouse button once again. y?

Oh, it's a shooter game, ammo engine thing.

btw any suggestions on my scripting would be nice.



int chooser;
int mouse_clicks = 0;

function on_mouse_click(int button) {
// called when a mouse button is clicked. button is either LEFT or RIGHT
if (IsTimerExpired(9)==1){      //when the reload timer is up
 mouse_clicks = 0;
 EnableCursorMode(MODE_LOOK);
 SetCursorMode(MODE_LOOK);
 SetObjectGraphic(3,10);
 }

if (IsGamePaused() == 1) {
// Game is paused, so do nothing (ie. don't allow mouse click)
}
else if (button==LEFT) {
ProcessClick(mouse.x, mouse.y, GetCursorMode() );
mouse_clicks = mouse_clicks + 1; // increasing mouse click counter
if (mouse_clicks < 9) {
PlaySound(1);
}
if (mouse_clicks == 0) {
 SetObjectGraphic(3,10);
 SetCursorMode(MODE_LOOK);
 }
if (mouse_clicks == 1) { //changes graphics with number of
 SetObjectGraphic(3,11);//clicks. Changes the ammo thing.
 }
if (mouse_clicks == 2) {
 SetObjectGraphic(3,12);
 }
if (mouse_clicks == 3) {
 SetObjectGraphic(3,13);
 }
if (mouse_clicks == 4) {
 SetObjectGraphic(3,14);
 }
if (mouse_clicks == 5) {
 SetObjectGraphic(3,15);
 }
if (mouse_clicks == 6) {
 SetObjectGraphic(3,16);
 }
if (mouse_clicks == 7) {
 SetObjectGraphic(3,17);
 }
if (mouse_clicks == 8) {
 SetObjectGraphic(3,18);
   SetTimer(9, 50);
 SetCursorMode(MODE_WALK);
 DisableCursorMode(MODE_LOOK);
 mouse_clicks = 10;
 }
}

else { // right-click, so cycle cursor
 SetTimer(9, 50);
 SetCursorMode(MODE_WALK);     //when right clicked re-loads
 DisableCursorMode(MODE_LOOK); //sets the time it
 mouse_clicks = 10;                         //to reload
}

}
#5
I'm making this shooter where you have limited ammo, so is it possible? If so, how do i do it?
#6
Hm...i don't know

try GUIoff(X)

where x is the gui number.
Working?
#7
Advanced Technical Forum / mod music problem!
Fri 23/01/2004 01:08:55
ok, when i saved my game and then loaded it the backround music speed was very slow.

Everytime the music was at the middle this happened. In the beginnig of the music it didn't though.

#8
But it blocks for me...
#9
sorry. how do you move a CHARACTER.
#10
How do you move a object without making the game busy?
#11
SetTimer(1,1000);
if (IsTimerExpired(1)==1)
{ObjectOff (3);
DisableHotspot (6);
}

that code wouldn't work because the first time it checks if the timer is 1000 its probably only 1 or something.

So i repeatedly checked to see if the timer was gone.

Anyway, this is a much simpler way to do things. i don't like to much scripting, Mainly 'cause i don't know much.

Thx for all you time.

Ps. I saved all of the replies for later reference.  ;)
#12
undefined token Objectcommand
#13
I used the code:

SetTimer(1,1000);
if (IsTimerExpired(1)==1)
{ObjectOff (3);
DisableHotspot (6);
}

but that didn't work.

#14
If i wanted a object to wait a few seconds before doing the next command how do i do that? I also want the player to be able to move while thats happening.
#15
I'm making this game and i'm up to this bit where knives come down from above. You can dodge 'em.

How do i make it so that the knives can come down, you can move freely and if the knives touch you, you die.
#16
Silly me. Turns out i tried to play a .it file.

#17
How do you change the icons of the .exe from the cup to something else?
SMF spam blocked by CleanTalk