FOnline Development > Questions and Answers
How to change CrType or Critter type animation by a dialog?!
Grey:
So yeah, im trying to change the player animation via dialog. Adding a result script.
I tried to use "debug" module but it obviously wont work.
I guess i need to add a function like r_MakeMeAGoddamnMutie to the result script but... I have no idea how to write a script sorry, i have no idea of scripting/programing etc
Any charitable soul? I need help
JovankaB:
Paste this in dialog.fos:
--- Code: ---void r_ChangeSkin(Critter& player, Critter@ npc, int val)
{
if (player.ChangeCrType(val))
player.StatBase[ST_BASE_CRTYPE] = val;
}
--- End code ---
In dialog editor, result tab:
In this case skin/crtype will be changed to 21 (green super mutant)
Grey:
Thank you JovankaB! ;)
I'll go right to testing! I think is a good moment to learn something about this
Balthasar:
I have a question, somehow related to this issue:
I want the predialogue to check if it's day- or nighttime. Luckely this was something Ghosthack did mention within his dialog editor tutorial (via the dialog@d_checkNight script-function). Unfortunatly this function isn't included within the SDK "dialog"-script.
So, if someone could post this function here or an own solution, this would be nice :).
Plech:
this?
--- Code: ---bool d_checkNight(Critter& player, Critter@ npc)
{
uint fullsecond = 0;
uint16 year=0, month=0, dayOfWeek=0, day=0, hour=0, minute=0, second=0;
GetGameTime(fullsecond,year,month,dayOfWeek,day,hour,minute,second);
if (hour >= 8 && hour <= 20)
return true;
else
return false;
}
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version