Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-02-2001, 06:09 AM
LinksReturn LinksReturn is offline
Registered User
Join Date: Sep 2001
Posts: 92
LinksReturn is on a distinguished road
Send a message via AIM to LinksReturn
Someone help me!!

How do i make the npcs variable increase by one each time it gets hit by the HAMMER?? Please help me
__________________
-§hakakµ
Head Lat for Andor
Aim: Moe478
E-mail: [email protected]
Reply With Quote
  #2  
Old 10-02-2001, 06:12 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
i think you would have to add scripting to the hammer
Reply With Quote
  #3  
Old 10-02-2001, 06:17 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
he has a point
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #4  
Old 10-02-2001, 06:22 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Triggeraction , course, I would use testnpc too to make it a little less laggy...
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #5  
Old 10-02-2001, 06:29 AM
LinksReturn LinksReturn is offline
Registered User
Join Date: Sep 2001
Posts: 92
LinksReturn is on a distinguished road
Send a message via AIM to LinksReturn
In case u haven't noticed i'm new at the nat stuff. I don't know very much, but i'm trying :-P, i'm more of a lat . But anyways, i know about the scripting in the hammer, just not sure what to use lol
__________________
-§hakakµ
Head Lat for Andor
Aim: Moe478
E-mail: [email protected]
Reply With Quote
  #6  
Old 10-02-2001, 06:45 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by Xaviar
Triggeraction , course, I would use testnpc too to make it a little less laggy...
That pretty much says it all, look 'em up in the commands.rtf, and if ya've still questions after that, post em, and Ill help ya out, Im cooking supper right now though, so I wont be too helpfull X_X
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #7  
Old 10-02-2001, 06:51 AM
ZORG1986 ZORG1986 is offline
Registered User
ZORG1986's Avatar
Join Date: Jul 2001
Location: England - Yes thats the small Island in Europe that Ownz you all.
Posts: 783
ZORG1986 is on a distinguished road
Send a message via ICQ to ZORG1986 Send a message via AIM to ZORG1986
Quote:
Originally posted by Xaviar


That pretty much says it all, look 'em up in the commands.rtf, and if ya've still questions after that, post em, and Ill help ya out, Im cooking supper right now though, so I wont be too helpfull X_X
Yea people should really look in commands.rtf before posting on here....
__________________


Zorg (Era Staff) - Contact : [email protected]
Reply With Quote
  #8  
Old 10-02-2001, 06:54 AM
LinksReturn LinksReturn is offline
Registered User
Join Date: Sep 2001
Posts: 92
LinksReturn is on a distinguished road
Send a message via AIM to LinksReturn
I've looked at it, but i'm not sure how I would use it "triggeraction x,y,action,params; triggers a ‘if (action<action>)...’ on the objects on (x,y)"

params? O.o, and how would i apply it to the hammer
__________________
-§hakakµ
Head Lat for Andor
Aim: Moe478
E-mail: [email protected]
Reply With Quote
  #9  
Old 10-02-2001, 07:01 AM
ZORG1986 ZORG1986 is offline
Registered User
ZORG1986's Avatar
Join Date: Jul 2001
Location: England - Yes thats the small Island in Europe that Ownz you all.
Posts: 783
ZORG1986 is on a distinguished road
Send a message via ICQ to ZORG1986 Send a message via AIM to ZORG1986
triggeraction x,y,action,params;
You wouldnt need any params, the action would be the action name and the x and y would be the x and y location of the NPC the trigger action is directed at.
The NPC on x y would need the command
if (actionname) {actions go here}
name being the name of the action you triggerd
and if its to increase a variable the actions it would need to trigger would be
varialblename+=1;

Now chances are i have completley confused you, cause i have confused myself, and i think i have just decided Im crap at explaining commands, erm someone translate the above into English please, LoL
__________________


Zorg (Era Staff) - Contact : [email protected]
Reply With Quote
  #10  
Old 10-02-2001, 07:06 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by LinksReturn
I've looked at it, but i'm not sure how I would use it "triggeraction x,y,action,params; triggers a ‘if (action<action>)...’ on the objects on (x,y)"

params? O.o, and how would i apply it to the hammer
Use a triggeraction on the x/y that you use the hammer on (use testnpc first to make sure theres an npc there), then in the npc you need to recognize if its been hit by the hammer:

if (actionactionname) {
if (this.hit<insertnumhere)
this.hit++;
else {
this.hit=0;
commands to run when its been hit num times;
}
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #11  
Old 10-02-2001, 07:10 AM
LinksReturn LinksReturn is offline
Registered User
Join Date: Sep 2001
Posts: 92
LinksReturn is on a distinguished road
Send a message via AIM to LinksReturn
*scratches head*
All i need to know if the hammer thingy, i got it working for the sword, but what would i put in the hammer, or as teh action is what i'm asking. example: if(npctouchsme) or what?
oh btw thanx for helpin
__________________
-§hakakµ
Head Lat for Andor
Aim: Moe478
E-mail: [email protected]
Reply With Quote
  #12  
Old 10-02-2001, 07:12 AM
LinksReturn LinksReturn is offline
Registered User
Join Date: Sep 2001
Posts: 92
LinksReturn is on a distinguished road
Send a message via AIM to LinksReturn
but then again, i have it in about the simplest form possible, i'm no nat expert as you can tell.
__________________
-§hakakµ
Head Lat for Andor
Aim: Moe478
E-mail: [email protected]
Reply With Quote
  #13  
Old 10-02-2001, 08:19 AM
Vinvect Vinvect is offline
Registered User
Join Date: Aug 2001
Location: U.S.A,California,Milpitas,In A House,In Room,On A Seat,On a Computer
Posts: 157
Vinvect is on a distinguished road
Send a message via ICQ to Vinvect Send a message via Yahoo to Vinvect
Talking here

heres for hammer:
NPC Code:

if (playertouchsme) {
toweapons Hammer;
set gothammer;
set alreadygothammer;
destroy;
}
if (playerenters) {
hideimg 1;
this.step = 0;
timeout = 0;
show;
}
if (weaponfired && this.step<=0) {
triggeraction playerx+1.5+vecx(playerdir)*2,
playery+2+vecy(playerdir)*2,hammering,#v(hammerpow er);
hideimg 1;
hidesword 0.5;
freezeplayer 0.5;

timeout = 0.05;
this.step = 0;
}
if (timeout) {
this.step++;
if (this.step<10) {
if (this.step<3) {
if (playerdir==0) playersprite = 11;
else if (playerdir==2) playersprite = 6;
else playersprite = 9;
} else {
if (playerdir==0) playersprite = 10;
else if (playerdir==2) playersprite = 11;
else playersprite = 11;
}
if (this.step==6) {
set teststake;
set testhurt;
}
if (playerdir==0) showimg 1,wham0.gif,playerx-0.75,playery-1.7;
if (playerdir==1) showimg 1,wham1.gif,playerx-1.7,playery-0.2;
if (playerdir==2) showimg 1,wham2.gif,playerx+0.6,playery-0.4;
if (playerdir==3) showimg 1,wham3.gif,playerx+1.5,playery-0.2;
timeout = 0.05;
} else {
playersprite = 0;
hideimg 1;
this.step = 0;
}
}
if (teststake) {
unset teststake;
putx = playerx + 0.5;
puty = playery + 2;
if (playerdir==0) puty -= 3;
if (playerdir==1) { putx -= 2; puty -= 0.5; }
if (playerdir==2) { putx += 0.5; puty += 1; }
if (playerdir==3) { putx += 2; puty -= 0.5; }
putx = int(putx);
puty = int(puty);
set isstake;
for (i=0; i<2; i++) for (j=0; j<2; j++) {
b = board[putx+i+64*(puty+j)];
bx = b % 16;
by = int(b / 16);
if (!(bx==10+i && by==20+j) &&
!(bx==4+i && by==103+j))
unset isstake;
}
if (isstake) {
unset isstake;
board[putx+64*puty] = 10+112*16;
board[putx+1+64*puty] = 11+112*16;
board[putx+64*(puty+1)] = 10+113*16;
board[putx+1+64*(puty+1)] = 11+113*16;
updateboard putx,puty,2,2;
play axe.wav;
} else play arrowon.wav;
}
if (testhurt) {
unset testhurt;
testx = playerx+1.5;
testy = playery+2;
if (playerdir==0) testy-=2;
if (playerdir==1) testx-=2;
if (playerdir==2) testy+=2;
if (playerdir==3) testx+=2;
for (i=0; i<compuscount; i++) {
if (abs(testx-(compus[i].x+1))<=1 &&
abs(testy-(compus[i].y+1))<=1.5 &&
compus[i].mode!=3)
hitcompu i,3,testx,testy;
}
for (i=1; i<playerscount; i++) {
if (abs(testx-(players[i].x+1.5))<=1 &&
abs(testy-(players[i].y+2))<=1.5) {
// hitplayer i,2,testx,testy;
putleaps 2,testx-1,testy-1;
unset gothammer;
destroy;
}
}
}


then u put this on npc:
NPC Code:

if (actionhammering) {
hammerpower = strtofloat(#p(0));
this.power -= hammerpower;
if (this.power<=0) {
setstring PUT_NAMEHERE_,#v(strtofloat(#s(PUT_NAME_HERE))+1);
hide;
}
}


__________________
==========================
I Script Really Good
&
Looking For A NAT Job
==========================
Quote:
That's like a big lugee!
-Evolution The Movie
Quote:
Ha Ha Ha Give It Up!
-Cyrus From Bomberman
I'm not a Bomy anymore.
I'm a MUTATED BROCLI MONSTER!
(or SIGN MONSTER)
If you make me angry,
I'LL EAT YOU WHOLE!
ME, MUTATED BROCLI MONSTER MASTER
(or SIGN MONSTER)
WILL EAT YOU ALL UP!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Quest Valley Owner
Looking For Staff
Pm Me
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
O.o Still Have My Braen Damaegd o.O


Thanks To Esiah, He Made This For Me!
Thanks Esiah!
Reply With Quote
  #14  
Old 10-02-2001, 08:33 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

Sir, please go away and come back after you learn how to NOT use flags for weapons.
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #15  
Old 10-02-2001, 07:25 PM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
he just copied the hammer script so he probably wasnt the one who used flags
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:53 PM.


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