Quote:
Originally posted by joseyisleet
-=Josey=-
Hmm, do you mean something like this?
NPC Code:
/* NPC made by Josey Hunt
The NPC in the level part. */
if (playertouchsme){
toweapons Test;
}
if (weaponfired){
putnpc laysignerror.GIF,laysign_v2.txt,players[0].x+1+vecx(playerdir)*2.5,players[0].y+1.5+vecy(playerdir)*2.5;
}
// Text file for the NPC
if (created){
showcharacter;
setcharprop #3,#3;
setcharprop #8,#8;
setcharprop #C0,#C0;
setcharprop #C1,#C1;
setcharprop #C2,#C2;
setcharprop #C3,#C3;
setcharprop #C4,#C4;
blockagain;
}
Something like this? I think that would make the NPC look like the player, not sure though, I hate non pay-to-play scripting....
|
Unforunately that would automattically take it from the first person who entered the level (Or the leader), and since the person who is laying it does not specifically have to be the leader it might in fact take the wrong person.
If this is for this version, just make it do this instead:
NPC Code:
//The actual weapon, simple innit?
if (playertouchsme)
toweapons Sign Layer V2;
if (weaponfired)
putnpc laysignerror.GIF,laysign_v2.txt,playerx,playery;
NPC Code:
//laysign_v2.txt
if (created) {
showcharacter;
for (i=0;i<playerscount;i++) {
if ((int(players[i].x)==int(x))&&(int(players[i].y)==int(y))&&(strlen(#a(i))>0) ChangeStuff();
}
}
if (playertouchsme) {
if (strequals(#a,#P5(-1))) ChangeStuff();
}
function ChangeStuff() {
setcharprop #3,#3(i);
setcharprop #8,#8(i);
setcharprop #C0,#C0(i);
setcharprop #C1,#C1(i);
setcharprop #C2,#C2(i);
setcharprop #C3,#C3(i);
setcharprop #C4,#C4(i);
setcharprop #P5,#a(i);
message #c(i);
}
if (playerchats&&strequals(#c,destroy)) {
//This needs to be written completely together, but the forum applies an automatic line break >.<
if (strequals(#g,GP)||strequals(#g,FAQ)||strequals(#g (LAT)||strequals(#g,GC)) destroy;
}
This should work perfectly, though since it's untested and I haven't really gotten much experience with non-P2P scripting it might not.