generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit
This commit is contained in:
22
_module/nss/pvote.nss
Normal file
22
_module/nss/pvote.nss
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "nw_i0_generic"
|
||||
void main()
|
||||
{
|
||||
|
||||
object oMod = GetModule();
|
||||
object oCrystal1 = GetObjectByTag("crystal1");
|
||||
object oCrystal2 = GetObjectByTag("crystal2");
|
||||
object oCrystal3 = GetObjectByTag("crystal3");
|
||||
int oVote = GetLocalInt(oMod, "pvote");
|
||||
int oPlayers = GetLocalInt(oMod, "num_players");
|
||||
oVote=oVote+1;
|
||||
SetLocalInt(oMod, "pvote", oVote);
|
||||
int oResult = GetLocalInt(oMod, "pvote");
|
||||
if (oResult==oPlayers)
|
||||
{
|
||||
AssignCommand(oCrystal1, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||||
AssignCommand(oCrystal2, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||||
AssignCommand(oCrystal3, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||||
SetLocalInt(oMod, "lever_state", 1);
|
||||
RecomputeStaticLighting(GetArea(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user