HP bar com sprites
Enviado: Qua Jul 08, 2009 4:32 pm
como eu faço uma barra de vida com sprites?
Ou seja, a medida que a saúde bo bicho vai diminuindo, os sprites com as barrinhas de vida vão diminuindo.script 4 (void) //Baphomet health script
{
setfont("hbaph_15");
if(getactorproperty(250,APROP_HEALTH)>1000)
{
setfont("hbaph_14");
}
if(getactorproperty(250,APROP_HEALTH)>2000)
{
setfont("hbaph_13");
}
if(getactorproperty(250,APROP_HEALTH)>3000)
{
setfont("hbaph_12");
}
if(getactorproperty(250,APROP_HEALTH)>4000)
{
setfont("hbaph_11");
}
if(getactorproperty(250,APROP_HEALTH)>5000)
{
setfont("hbaph_10");
}
if(getactorproperty(250,APROP_HEALTH)>6000)
{
setfont("hbaph_9");
}
if(getactorproperty(250,APROP_HEALTH)>7000)
{
setfont("hbaph_8");
}
if(getactorproperty(250,APROP_HEALTH)>8000)
{
setfont("hbaph_7");
}
if(getactorproperty(250,APROP_HEALTH)>9000)
{
setfont("hbaph_6");
}
if(getactorproperty(250,APROP_HEALTH)>10000)
{
setfont("hbaph_5");
}
if(getactorproperty(250,APROP_HEALTH)>11000)
{
setfont("hbaph_4");
}
if(getactorproperty(250,APROP_HEALTH)>12000)
{
setfont("hbaph_3");
}
if(getactorproperty(250,APROP_HEALTH)>13000)
{
setfont("hbaph_2");
}
if(getactorproperty(250,APROP_HEALTH)>14000)
{
setfont("hbaph_1");
}
if(getactorproperty(250,APROP_HEALTH)<1)
{
Pedro Vc escreveu::facepalm:
setfont é um comando usado junto com print e HUDMessage( em breve na wiki) que possibilita o mapper ou sei lá o quê a escolher uma fonte para suas mensagens.Mathey Bu escreveu:hum... seffont é o sprite?
Código: Selecionar todos
script 4 (void) //Baphomet health script
{
setfont("hbaph_15"); // Define a sprite a ser usada
if(getactorproperty(250,APROP_HEALTH)>1000)
{
setfont("hbaph_14");
}
if(getactorproperty(250,APROP_HEALTH)>2000)
{
setfont("hbaph_13");
vlw cara, brigadão mais uma vezLORD DOOM1.666 escreveu:setfont é um comando usado junto com print e HUDMessage( em breve na wiki) que possibilita o mapper ou sei lá o quê a escolher uma fonte para suas mensagens.Mathey Bu escreveu:hum... seffont é o sprite?
Nesse caso, se usa setfont para definir a imagem (sprite) que irá aparecer.
Sinto falta do comando "Hudmessage" ai ou é impressão minha? O.oCódigo: Selecionar todos
script 4 (void) //Baphomet health script { setfont("hbaph_15"); // Define a sprite a ser usada if(getactorproperty(250,APROP_HEALTH)>1000) { setfont("hbaph_14"); } if(getactorproperty(250,APROP_HEALTH)>2000) { setfont("hbaph_13");