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 09-11-2008, 02:41 AM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Angry if hit by

PHP Code:
//#CLIENTSIDE

if (weaponfired) {
  
replaceani idle,dg_mp5a2-fire;
  
replaceani walk,dg_mp5a2-walk;
  
setani dg_mp5a2-walk,;
  
freezeplayer .1;
  
setani dg_mp5a2-fire,;
  
this.angle=getangle(vecx(playerdir),vecy(playerdir));
  
this.x=playerx+vecx(playerdir)*2;
  
this.y=(playery-.5)+vecy(playerdir)*2.5;
 
shoot this.x,this.y,playerz,this.angle+random(this.maxangle*-1,this.maxangle),
    
1,0,dg_bullet,1;
}
if (
keypressed && strequals(#p(1),s)) {
replaceani idle,idle;
replaceani walk,walk;
if(
hitby)
dg_bullet
setani hurt
,;} 
when i try it if they hit by it ,it dont dont do anything
can sombody help me?????????
Reply With Quote
  #2  
Old 09-11-2008, 03:04 AM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ???

In other news, that code isn't even syntactically valid.
Reply With Quote
  #3  
Old 09-11-2008, 03:23 AM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
well can ya help me then lol
Reply With Quote
  #4  
Old 09-11-2008, 03:47 AM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by GULTHEX View Post
when i try it if they hit by it ,it dont dont do anything
can sombody help me?????????
One, you don't need to use the emote. :/

Two, try if (was hit) (remove the space between "was" and "hit". Bloody censor.) for the NPC. Works if the player is slashing it.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #5  
Old 09-11-2008, 05:41 AM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by Programmer View Post
(remove the space between "was" and "hit". Bloody censor.)
Why resort to calling it "bloody"? I'm normally quite je****l, but this parenthesis drives me sliding on the metaphorical ****ch into a graf***e of angst (Incidentally, I almost hit a ***tre in the process, or was that a ****tah? I'm not quite certain, but I would prefer recycling ****tim), along with my ****hhound (a *****, if you're curious) notwithstanding.
Reply With Quote
  #6  
Old 09-11-2008, 06:51 AM
TSAdmin TSAdmin is offline
Forum Moderator
TSAdmin's Avatar
Join Date: Aug 2006
Location: Australia
Posts: 1,980
TSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to behold
Quote:
Originally Posted by DrakilorP2P View Post
Why resort to calling it "bloody"? I'm normally quite je****l, but this parenthesis drives me sliding on the metaphorical ****ch into a graf***e of angst (Incidentally, I almost hit a ***tre in the process, or was that a ****tah? I'm not quite certain, but I would prefer recycling ****tim), along with my ****hhound (a *****, if you're curious) notwithstanding.
Okay
__________________
TSAdmin (Forum Moderator)
Welcome to the Official GraalOnline Forums! Where sharing an opinion may be seen as a declaration of war!
------------------------
· User Agreement · Code of Conduct · Forum Rules ·
· Graal Support · Administrative Contacts ·
Reply With Quote
  #7  
Old 09-11-2008, 12:17 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Drak is trying to prove how instable the censor system is by using as many valid words as possible, that the system believes is invalid.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #8  
Old 09-11-2008, 04:45 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
So is anybody gona help me or what!!!!!
Reply With Quote
  #9  
Old 09-11-2008, 05:13 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by GULTHEX View Post
So is anybody gona help me or what!!!!!
Are you blind, or just acting stupid? Try reading the posts above.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #10  
Old 09-11-2008, 05:43 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
I mean like if they get hit by the gani they play a gani!
Reply With Quote
  #11  
Old 09-11-2008, 05:52 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by GULTHEX View Post
I mean like if they get hit by the gani they play a gani!
You're not really describing your issue or what you're trying to accomplish very well in your first post, you know. How can we help you when we don't know what you're trying to achieve? From briefly looking at your script (all my eyes could stand), I believe what you're looking for is onActionProjectile.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #12  
Old 09-11-2008, 05:57 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
so i do this ?
PHP Code:
//#CLIENTSIDE
if (weaponfired) {
  
replaceani idle,dg_mp5a2-fire;
  
replaceani walk,dg_mp5a2-walk;
  
setani dg_mp5a2-walk,;
  
freezeplayer .1;
  
setani dg_mp5a2-fire,;
  
this.angle=getangle(vecx(playerdir),vecy(playerdir));
  
this.x=playerx+vecx(playerdir)*2;
  
this.y=(playery-.5)+vecy(playerdir)*2.5;
 
shoot this.x,this.y,playerz,this.angle+random(this.maxangle*-1,this.maxangle),
    
1,0,dg_bullet,1;
}
if (
keypressed && strequals(#p(1),s)) {
replaceani idle,idle;
replaceani walk,walk;
onActionProjectile
setani hurt
,;} 
Reply With Quote
  #13  
Old 09-11-2008, 08:12 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by GULTHEX View Post
so i do this ?
PHP Code:
//#CLIENTSIDE
if (weaponfired) {
  
replaceani idle,dg_mp5a2-fire;
  
replaceani walk,dg_mp5a2-walk;
  
setani dg_mp5a2-walk,;
  
freezeplayer .1;
  
setani dg_mp5a2-fire,;
  
this.angle=getangle(vecx(playerdir),vecy(playerdir));
  
this.x=playerx+vecx(playerdir)*2;
  
this.y=(playery-.5)+vecy(playerdir)*2.5;
 
shoot this.x,this.y,playerz,this.angle+random(this.maxangle*-1,this.maxangle),
    
1,0,dg_bullet,1;
}
if (
keypressed && strequals(#p(1),s)) {
replaceani idle,idle;
replaceani walk,walk;
onActionProjectile
setani hurt
,;} 
Try explaining what you're doing for one.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #14  
Old 09-12-2008, 05:26 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
well im trying to make it if they get hit by the bullet they play the gani hurt
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 08:25 PM.


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