PDA

View Full Version : Adding rupees...


theHAWKER
02-01-2007, 08:15 PM
i have a script where u slash the box 50 times and u get a rupee, but
lay2 greenrupee,playerx,playery; just drops your own rupee and dosn't benefit you at all :(
my script it://#CLIENTSIDE
if (created || playerenters) {
this.slash = 30;
show;
timeout=.05;
}
if (wa****){
this.slash -= 1;
}
if (this.slash ==0){
lay2 greenrupee,playerx,playery;
this.slash = 30;
}
if (timeout){
message Slash Me #s(this.slash) More Times!;
timeout=.05;
}
so how would i make it so you just get a rupee?

Crow
02-01-2007, 08:17 PM
i have a script where u slash the box 50 times and u get a rupee, but
lay2 greenrupee,playerx,playery; just drops your own rupee and dosn't benefit you at all :(
my script it://#CLIENTSIDE
if (created || playerenters) {
this.slash = 30;
show;
timeout=.05;
}
if (wa****){
this.slash -= 1;
}
if (this.slash ==0){
lay2 greenrupee,playerx,playery;
this.slash = 30;
}
if (timeout){
message Slash Me #s(this.slash) More Times!;
timeout=.05;
}
so how would i make it so you just get a rupee?

You are using hella old script commands in your scripts. Why exactly? You have to script your own rupee npc here.

Edit: Oh yes, btw, you should either use

#v(this.slash)

instead of

#s(this.slash)

because its a variable, or just script everything in GS2, would be better :]

theHAWKER
02-01-2007, 08:19 PM
You are using hella old script commands in your scripts. Why exactly? You have to script your own rupee npc here.

whats wrong with old script?
and how would i make my own rupee?

Crow
02-01-2007, 08:20 PM
whats wrong with old script?
and how would i make my own rupee?

Indirectly disabled. Just script an npc that acts like a rupee and put the script in a class. Then join it if you need it.

theHAWKER
02-01-2007, 08:24 PM
Indirectly disabled. Just script an npc that acts like a rupee and put the script in a class. Then join it if you need it.

Im not somsort of super gienious :(

theHAWKER
02-01-2007, 08:29 PM
i figured it out, its: player.rupees +=1;
ha ha ha ha ha

Skyld
02-01-2007, 08:41 PM
i figured it out, its: player.rupees +=1;
ha ha ha ha ha
If you are working in the old scripting engine, it should be playerrupees += 1; instead of player.rupees += 1;.

Crow
02-01-2007, 08:42 PM
If you are working in the old scripting engine, it should be playerrupees += 1; instead of player.rupees += 1;.

Yea, right. Forgot to add that ;P

Chandler
02-01-2007, 10:34 PM
//#CLIENTSIDE
if (created || playerenters) {
this.slashAmounts = 30;
}
if (was hit) { //Remove the space.
this.slashAmounts -= 1;
message Slash me #v(this.slash) more times!;
if (this.slashAmounts <= 0) {
lay2 greenrupee,playerx,playery;
this.slashAmounts = 30;
}
}

You don't need a timeout.