Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-21-2001, 06:33 AM
Petey84 Petey84 is offline
Registered User
Join Date: Sep 2001
Location: Johnstown PA, and Mobile AL
Posts: 308
Petey84 is on a distinguished road
Send a message via AIM to Petey84 Send a message via Yahoo to Petey84
Angry Triggeraction

Shakaku:
alright, can anyone tell me why when i hit the npc with the hammer, it doesn't inscrease, but when i touch it, it does?? :grrr:
__________________
-Pete aka Wilddude
-Nishoku as well ;D!

AIM
Pete: WildDude2002
Nishoku: Nishoku, SaikoAkumu
-----------------------------------------------
StarX480: bai
Reply With Quote
  #2  
Old 10-21-2001, 06:39 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
I have the same problem
Here is what I have this so far:
if (actionname) setstring server.namedone,#v(namedone);
message #s(server.namedone)%
how would I get it to add 1 percent every time you fired the weapon which uses the triggeraction command? (I already have the triggeraction working on the weapon)
Reply With Quote
  #3  
Old 10-21-2001, 08:33 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
if (actionname) {
setstring server.namedone,#v(namedone+1);
message #s(server.namedone)%;
}

something like this or what u mean?
so it would set the serverstring+1 everytime u use the item and message the new percents... (if u mean something else I misunderstood you)
__________________
No Webhost at the moment
Reply With Quote
  #4  
Old 10-21-2001, 10:32 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
server.percentdone++;
Reply With Quote
  #5  
Old 10-21-2001, 11:19 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by TDO2000
if (actionname) {
setstring server.namedone,#v(namedone+1);
message #s(server.namedone)%;
}

something like this or what u mean?
so it would set the serverstring+1 everytime u use the item and message the new percents... (if u mean something else I misunderstood you)
That works but after 1%, it wont add anymore
Reply With Quote
  #6  
Old 10-21-2001, 04:52 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
ok hmmm u mean something like this I think:
if (actionname) {
namedone = strtofloat(#s(server.namedone))+1;
setstring server.namedone,#v(namedone);
message #s(server.namedone)%;
}

this should work like u want it =)
__________________
No Webhost at the moment
Reply With Quote
  #7  
Old 10-21-2001, 07:26 PM
Petey84 Petey84 is offline
Registered User
Join Date: Sep 2001
Location: Johnstown PA, and Mobile AL
Posts: 308
Petey84 is on a distinguished road
Send a message via AIM to Petey84 Send a message via Yahoo to Petey84
Shakaku:
well it works, kinda. The triggeraction is in the hammer, so whenever i hit the npc once with the hammer, i touch it and it goes up, not when i hit it :grrr:
__________________
-Pete aka Wilddude
-Nishoku as well ;D!

AIM
Pete: WildDude2002
Nishoku: Nishoku, SaikoAkumu
-----------------------------------------------
StarX480: bai
Reply With Quote
  #8  
Old 10-21-2001, 07:44 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
um....
when the hamer does something like:

triggeraction playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playe rdir)*2,hammer,;

and the thing u use the hammer on does:
if (actionhammer) {
hammered = strtofloat(#s(server.hammered))+1;
setstring server.hammered,#v(hammered);
message #s(server.hammered)%;
}

it should work...
__________________
No Webhost at the moment
Reply With Quote
  #9  
Old 10-21-2001, 11:07 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by TDO2000
ok hmmm u mean something like this I think:
if (actionname) {
namedone = strtofloat(#s(server.namedone))+1;
setstring server.namedone,#v(namedone);
message #s(server.namedone)%;
}

this should work like u want it =)
It works fine except now I've run into another problem, I want it to destroy after it reaches 100% but I can't get that to work
if (strequals(#s,server.roastdone=100)) {hide}
that's what I thought would work but it doesn't
Reply With Quote
  #10  
Old 10-21-2001, 11:29 PM
Petey84 Petey84 is offline
Registered User
Join Date: Sep 2001
Location: Johnstown PA, and Mobile AL
Posts: 308
Petey84 is on a distinguished road
Send a message via AIM to Petey84 Send a message via Yahoo to Petey84
Shakaku:
= means assignment
==means equals, try that
__________________
-Pete aka Wilddude
-Nishoku as well ;D!

AIM
Pete: WildDude2002
Nishoku: Nishoku, SaikoAkumu
-----------------------------------------------
StarX480: bai
Reply With Quote
  #11  
Old 10-21-2001, 11:33 PM
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 Python523

It works fine except now I've run into another problem, I want it to destroy after it reaches 100% but I can't get that to work
if (strequals(#s,server.roastdone=100)) {hide}
that's what I thought would work but it doesn't
if (strequals(#s(server.roastdone),100)) {hide;}

#s is a messagecode..it needs an argument, and you don't need that semi-colon in gscript in the last line of a block, but you should have it there anyway...I almost wish Stefan would make it so that you do need that last semi-colon...
__________________
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
  #12  
Old 10-21-2001, 11:35 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Quote:
Originally posted by Petey84
Shakaku:
= means assignment
==means equals, try that
won't work either ;b

if (strtofloat(#s(server.roastdone))>=100) {hide;}

this is the best way =)
__________________
No Webhost at the moment
Reply With Quote
  #13  
Old 10-21-2001, 11:38 PM
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 TDO2000


won't work either ;b

if (strtofloat(#s(server.roastdone))>=100) {hide;}

this is the best way =)
Thats what you think *points at previous post*
__________________
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
  #14  
Old 10-21-2001, 11:46 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
ohhh yeah k this is good too
u were some seconds faster then me =)
__________________
No Webhost at the moment
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 12:07 PM.


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