help with fighting

Started by Mr.Trant, Sat 03/05/2003 02:57:39

Previous topic - Next topic

Mr.Trant

i am makin a lvl that u stand in a certain place and a guy come at u, but u have to shoot him before he gets to a certain point, but i cant make it so it happens, please help!!! its like this...
                                                     >:(
Point the bad                               -|-  
guy has to get to                          ^
----------------->____________________________________________
__________________________________________________________
                                                     ^
                                                      |
                                                   Your here

Mr.Trant

like the only way i can is to make it automatically happen and thats gay,

its kinda like house of the dead, like how the zombies come at u but dont hurt u unless they get close, i want to make the same kinda thing happen!!!

Ishmael

Is there a way to test if a character is standing on an other char? I mean if there is, you could use it test if the bad guy is standing on the payers "area", a script would be run... To get the distance, would use a view of the same char with bigger frames... Chris?

The shooting.... using a if(GetGlobelInt(x)==1) in the on_key_press with the keycode of the shooting key... and when the shot may be shot, would GlobalInt x be set to 1, when the shot would not be possible (example no gun) he GlobalInt would be 0... does this make sense?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Pumaman

First of all, you've really got to be more specific - how have you tried to make it work so far? What commands and scripts have you used?

If the bad guy is just coming downwards, for instance, you can put a check in your room's Repeatedly Execute event like:

if (character[BADGUY].y > YYY) {
 // he got too close
}

where YYY is the Y co-ordinate that means he is too close and will kill the player.

Quotelike the only way i can is to make it automatically happen and thats gay

How is that 'gay'? In what way is being gay related to your question?

Scummbuddy

#4
Does the bad guy come up to you and have sex with you if he gets past that line/point if you dont shoot him in time?

Other than that, please dont use 'gay' as a defamation term and if for some reason you are shooting homosexuals... I wouldnt play the game.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Jimi

yes. Using "gay" like that is just as bad as being sexist, or racist.

Mr.Trant

i meant that it would automatically happen as like theres no way to stop it, and thats mad beat.

Mr.Trant

tk, wut do u mean??? im not really followin u??? i have cursor 9 and 10 as the guns, so it dont really matter.

Ishmael

I mean that you could use a Global Int to set is the gun "useable" or not...

in the function on_mouse_click:
 if ((button==LEFT) && (GetCursorMode()==9) && (GetGlobalInt(10)==1)) { // In this exampe, GlobalInt 10 is used to set if the gun in cursormode 9 is "shootable"
   if (GetCharacterAt(mouse.x, mouse.y)==12) { // Badguy char number in this exampe is 12
     // Shooting code here. Will be executed if the badguy is under the mouse, and the gun can be shot
   }
 }
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk