I downloaded the new G2k1 version today, and that "action" tag sounds like it would be very useful for future NPCs :). But unfortunately, there's still no way to set a variable for a specific player/group of players that can be manipulated and changed. So I'm proposing a tag that would be beneficial to G-Script and would be very useful for making CS type matches.
if( event){ setplayerindex #index, flag}
Also, you could be able to assign a few lines of code to only the specified index... like so:
player(index){
Notice that the tag is stationed next to an "if-then" thing. If the specified event occurs, an index would be set for the player who triggered the event, until the specified flag is unset. Here's an example of how this could be used:
NPC Code:
if(playerenters || timeout){
timeout= .05;
}
if(timeout && this.mode=0){
if(playery<20 && playery>15 && playerx>20 && playerx<25){
setplayerindex #PL, pagosflag;
this.mode=1;
}
}
if(timeout && keydown(a)){
player(#PL){
if(this.mode=1){
freezeplayer 3;
setplayerprop #c, EEK! LEAVE MY BRAIN ALONE!;
unset pagosflag;
}
}
}
This would cause the NPC to set an index for the player standing in that five by five area. If someone presses "a", the indexed player freezes in place, saying "Leave my brain alone!" Of course, this tag would be used for much more, well, useful things. But this should give you a pretty good idea of what I'm talking about.
|