Quote:
Originally Posted by Schetti
I've made a simple CTF-game times ago, and to show the flag by the player, I used a weapon I added to the player.
You could do the same and add a weapon to the players.
The script could be like:
PHP Code:
function onGlow() { if ( this.glowmod ) { setImg("light.png"); setcoloreffect(0.4,0.4,0.4,0.5); this.x = player.x; this.y = player.y; this.level = player.level; onGlow; } } //you need to try if it works with client or serverside
//#CLIENTSIDE
function onPlayerChats() { if (player.chat == "setglow") { this.glowmode = !this.glowmode onGlow; } }
Well, as I said, I didnt script for a while so this script will have some fails in it, but its a beginn.
|
There are quite a few things wrong with that, I recommend that anyone reading this not look at that code for pointers.
You should do something like this:
PHP Code:
//#CLIENTSIDE
function onCreated() {
onTimeOut();
}
function onTimeOut() {
hideimgs(200, 400); // lazy :[
for (temp.pl : players) {
showimg(200 + pl.id, "light2.png", pl.x - 1.5, pl.y - 1.5);
changeimgvis(200 + pl.id, 0);
changeimgcolors(200 + pl.id, 1, 0, 0, .7);
}
setTimer(0.05);
}
You can play around with the positions, and add a player.attr for the glow colors.