23 lines
733 B
Plaintext
23 lines
733 B
Plaintext
#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));
|
|
}
|
|
}
|