Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Bombs (https://forums.graalonline.com/forums/showthread.php?t=12844)

ownerofbabylon 09-25-2001 02:30 AM

Bombs
 
I wanna make a NPC that throws bombs over a wall and throws them maybe like 10 y so that it goes over the wall and actually lands in the middle of a level. Anyone know the best way to do this?

NooseKnot 09-25-2001 02:47 AM

well first make a NPC that throws bombs 10 y then ur done

NooseKnot 09-25-2001 02:49 AM

hers the coding
//NPC made by NooseKnot
if(playerenters||timeout){
set throwbomb;
}
if(throwbomb;){
throwbomb a little to the right;
throwbomb exactly 10y; //whatever the hell that means
throwbomb in middle of room over the wall in front of me;
}
if(throws bombs over wall in front of me){
unset throwbomb;
timeout=5;
}

Merlin 09-25-2001 02:50 AM

uhh
why not make it ujustable like
if (playerchats&&startswith(throwbomb,#c)) {
tokenize #c;
if (tokenscount==2) {
putbomb playerx,#t(1);
}
}

that would make it so you say throwbomb #
and the # = the y it would go
so you can so throwbomb 4
it would throw a bomb on your x but 4 y front of you
i think :\

Merlin 09-25-2001 03:33 AM

Quote:

Originally posted by Kaimetsu


The trouble there is that it'd place the bomb without it being in transit first. If you had an NPC Server then it'd be easy - just use an NPC for the bomb. If not, then j00 sux anyway.

:(

NooseKnot 09-25-2001 03:41 AM

he said throwbomb not put bomb.. god pay more attention:o
lol jk

09-25-2001 03:51 AM

Not really that good, I could of added him throwing the bomb but i am to lazy... :p

PHP Code:

// NPC by Stefan Knorr - edited by Ice Pick
if (playertouchsme) {toweapons bomb2;
}

if (
weaponfired && playerbombs>0) {
  if (
playerdir=0) {
    
putbomb 1,playerx+0.5,playery-7;
  }
  if (
playerdir=1) {
    
putbomb 1,playerx-7,playery+1;
  }
  if (
playerdir=2) {
    
putbomb 1,playerx+0.5,playery+7;
  }
  if (
playerdir=3) {
    
putbomb 1,playerx+7,playery+1;
  }
  
playerbombs playerbombs-1;



Thak2 09-25-2001 04:13 AM

An easy way to do it, would be to make a gani of the bomb gliding through the air, and then use putbomb.

Merlin 09-25-2001 04:13 AM

Quote:

Originally posted by Kaimetsu


I didn't mean j00, I meant Helmut guy.

:cool:

Thak2 09-25-2001 04:21 AM

Yeah, hes going to have an npc that throws the bombs, he can set its gani to a gani of it throwing the bomb and the bomb hurtling through the air. The bomb going through the air would be part of the NPCs gani.

But this would mean it would have to wait for the bomb to land before throwing another one. :(

Merlin 09-25-2001 04:21 AM

oh i thought he ment as a npcw.

but cant you use replacenai on a npc charcter and replace it with like bomb.gani


All times are GMT +2. The time now is 06:36 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.