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 04-10-2007, 10:38 PM
shadowjones shadowjones is offline
**** Scripter xD
Join Date: Apr 2007
Posts: 24
shadowjones is on a distinguished road
Kill Count

Hmm, basically...

Once you kill * many things you recieve clientr.* += 1

What I'm trying to do right this seconds are for the default scripted spiders. So basically, if (youkillaspider) {clientr.spider += 1;}
I don't even know where to start on the script so I'm just asking sooner than later.
Reply With Quote
  #2  
Old 04-10-2007, 10:51 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Well, ideally the only way to track this is to count the number of compus in the level when you enter, and keep track of them, whenever one of them dies add it to the count. But... this wouldn't work online because it'll keep track of others who kill them. I can't think of any way to do it online... Best bet is to probably script your own baddies.
Reply With Quote
  #3  
Old 04-10-2007, 11:01 PM
shadowjones shadowjones is offline
**** Scripter xD
Join Date: Apr 2007
Posts: 24
shadowjones is on a distinguished road
Quote:
Originally Posted by DustyPorViva View Post
Well, ideally the only way to track this is to count the number of compus in the level when you enter, and keep track of them, whenever one of them dies add it to the count. But... this wouldn't work online because it'll keep track of others who kill them. I can't think of any way to do it online... Best bet is to probably script your own baddies.
I don't mind that itll count one that other players kill. Thing is though that would mess me up here...is that there are 3 levels...maybe

level1 5 comps die clientr.part1 == 1
level2 5 comps die clientr.part2 == 1
level3 5 comps die clientr.part3 == 1

then for the return script
if (clientr.part1 == 1)&&(clientr.part2 == 1)&&(clientr.part3 == 1) ACTION;
else say2 Hello World!;

what would be the best way to format that with all three of the clientr?
Reply With Quote
  #4  
Old 04-10-2007, 11:10 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Sorry, I don't quite understand what you're trying to say.
Reply With Quote
  #5  
Old 04-10-2007, 11:13 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by DustyPorViva View Post
Sorry, I don't quite understand what you're trying to say.
Ahaha, that made me laugh. But I don't understand what hes saying either. Well, some of it I do
Reply With Quote
  #6  
Old 04-10-2007, 11:21 PM
shadowjones shadowjones is offline
**** Scripter xD
Join Date: Apr 2007
Posts: 24
shadowjones is on a distinguished road
There are 3 rooms that you are going to be required to kill 5 baddies in.
Since you can only keep track of 1 room at a time I will have to set 3 strings.

What would be the best way to script that if all strings == 1 that you will have an outcome... as in say2 helloworld;

(Ill annoy you guys later with more scripting questions, gotta eat dinner at parents house bbl) xD
Reply With Quote
  #7  
Old 04-10-2007, 11:21 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
< < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < <
^
Ask Stefan (sorry, this spam ares funneh xD)
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #8  
Old 04-10-2007, 11:23 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
if (compusdied && (strtofloat(#s(clientr.part1)) + strtofloat(#s(clientr.part2)) + strtofloat(#s(clientr.part3)))==3) {
???
}
Reply With Quote
  #9  
Old 04-10-2007, 11:24 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by DustyPorViva View Post
if (compusdied && (strtofloat(#s(clientr.part1)) + strtofloat(#s(clientr.part2)) + strtofloat(#s(clientr.part3)))==3) {
???
}
Or you could just check if clientr.part# is true and not false
Reply With Quote
  #10  
Old 04-10-2007, 11:28 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
True, but either way it adds to the same, you can either check if each one is true, of if they add all up to being true. Same outcome though.
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 06:03 PM.


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