Graal Forums

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

shadowjones 04-10-2007 10:38 PM

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.

DustyPorViva 04-10-2007 10:51 PM

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.

shadowjones 04-10-2007 11:01 PM

Quote:

Originally Posted by DustyPorViva (Post 1298859)
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?

DustyPorViva 04-10-2007 11:10 PM

Sorry, I don't quite understand what you're trying to say.

Rapidwolve 04-10-2007 11:13 PM

Quote:

Originally Posted by DustyPorViva (Post 1298872)
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

shadowjones 04-10-2007 11:21 PM

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

Switch 04-10-2007 11:21 PM

:pluffy: < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < <
^
Ask Stefan (sorry, this spam ares funneh xD)

DustyPorViva 04-10-2007 11:23 PM

if (compusdied && (strtofloat(#s(clientr.part1)) + strtofloat(#s(clientr.part2)) + strtofloat(#s(clientr.part3)))==3) {
???
}

Rapidwolve 04-10-2007 11:24 PM

Quote:

Originally Posted by DustyPorViva (Post 1298883)
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

DustyPorViva 04-10-2007 11:28 PM

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.


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

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