- Joined
- Dec 11, 2014
- Messages
- 2,004
Incomplete Demo Doesn't work (Not SOLVED)
I Am currently making an NPC system for my Map.
I Made a Demo, with Only 1 NPC, with Incomplete conversation and It doesn't enter the Mode!
Help!
Triggers:
It just Saves stuff within a Hashtable.
What This is meant to do is that when a player selects a Unit when his Hero Is near It, enter an NPC System.
The system consists nothing currently; Only plain Text-showing with no Exits.
Now when I click the Demo villager, it Doesn't do anything!
HELP?
I Am currently making an NPC system for my Map.
I Made a Demo, with Only 1 NPC, with Incomplete conversation and It doesn't enter the Mode!
Help!
Triggers:
-
NPC Init
-
Events
- Map initialization
- Conditions
-
Actions
- -------- Hashtable --------
- Hashtable - Create a hashtable
- Set NPC_Hashtable = (Last created hashtable)
- -------- Units --------
- -------- - --------
- Set NPC_RegisterNumber_Index = (NPC_RegisterNumber_Index + 1)
- Set NPC_UnitRegister = Villager (Male 2) 0003 <gen>
- Unit - Set the custom value of NPC_UnitRegister to NPC_RegisterNumber_Index
- Set NPC_Ask[1] = Hello.
- Set NPC_Answer[1] = Greetings.
- Set NPC_Ask[2] = How are You?
- Set NPC_Answer[2] = Fine, Thanks.
- Set NPC_Ask[3] = Bye!
- Set NPC_Answer[3] = Bye!
- Set NPC_NumberOfConversation = 3
- Hashtable - Save Handle OfNPC_UnitRegister as 0 of NPC_RegisterNumber_Index in NPC_Hashtable
- Hashtable - Save NPC_NumberOfConversation as 0 of (Key (Load 0 of NPC_RegisterNumber_Index in NPC_Hashtable)) in NPC_Hashtable
- Hashtable - Save (Facing of NPC_UnitRegister) as (NPC_NumberOfConversation + 1) of (Key (Load 0 of NPC_RegisterNumber_Index in NPC_Hashtable)) in NPC_Hashtable
-
For each (Integer NPC_UnitRegister_Index) from 1 to NPC_NumberOfConversation, do (Actions)
-
Loop - Actions
- Hashtable - Save NPC_Ask[NPC_UnitRegister_Index] as NPC_UnitRegister_Index of (Key (Load 0 of NPC_RegisterNumber_Index in NPC_Hashtable)) in NPC_Hashtable
- Hashtable - Save NPC_Answer[NPC_UnitRegister_Index] as NPC_UnitRegister_Index of (Key (Load 0 of NPC_RegisterNumber_Index in NPC_Hashtable)) in NPC_Hashtable
-
Loop - Actions
- -------- - --------
-
Events
-
NPC Entering
-
Events
- Player - Player 1 (Red) Selects a unit
- Player - Player 2 (Blue) Selects a unit
- Player - Player 3 (Teal) Selects a unit
- Player - Player 4 (Purple) Selects a unit
- Player - Player 5 (Yellow) Selects a unit
- Player - Player 6 (Orange) Selects a unit
- Player - Player 7 (Green) Selects a unit
- Player - Player 8 (Pink) Selects a unit
- Conditions
-
Actions
- Set NPC_PlayerNumber = (Player number of (Triggering player))
- Set Temp_P = (Position of (Triggering unit))
- Set NPC_TempUnitGroup = (Units within 512.00 of Temp_P matching (((Picked unit) Equal to Hero_Player[NPC_PlayerNumber]) and (((Picked unit) is alive) Equal to True)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in NPC_TempUnitGroup) Not equal to 1
-
Then - Actions
- Custom script: call DestroyGroup(udg_NPC_TempUnitGroup)
- Custom script: call RemoveLocation(udg_Temp_P)
- Skip remaining actions
- Else - Actions
-
If - Conditions
- Custom script: call DestroyGroup(udg_NPC_TempUnitGroup)
- Camera - Pan camera for Player[NPC_PlayerNumber] to Temp_P over 1.00 seconds
- Custom script: call RemoveLocation(udg_Temp_P)
- Unit - Make Hero_Player[NPC_PlayerNumber] face (Triggering unit) over 2.00 seconds
- Unit - Make (Triggering unit) face Hero_Player[NPC_PlayerNumber] over 2.00 seconds
- Cinematic - Turn cinematic mode On for (Player group(Player[NPC_PlayerNumber]))
- Cinematic - Turn on letterbox mode (hide interface) for (Player group(Player[NPC_PlayerNumber])): fade out over 0.00 seconds
- Set NPC_AskedUnit[NPC_PlayerNumber] = (Triggering unit)
- Set NPC_Load_TalkTimes_Integer = (Load 0 of (Key (Load 0 of (Custom value of (Triggering unit)) in NPC_Hashtable)) from NPC_Hashtable)
- Set NPC_Message_Ask = <Empty String>
-
For each (Integer A) from 1 to NPC_Load_TalkTimes_Integer, do (Actions)
-
Loop - Actions
- Set NPC_Message_Ask = (NPC_Message_Ask + ((Load (Integer A) of (Key (Triggering unit)) from NPC_Hashtable) + |n))
-
Loop - Actions
- Cinematic - Send transmission to (All players) from (Triggering unit) named What to Ask?: Play No sound and display NPC_Message_Ask. Modify duration: Set to 600.00 seconds and Don't wait
-
Events
The system consists nothing currently; Only plain Text-showing with no Exits.
Now when I click the Demo villager, it Doesn't do anything!
HELP?
Last edited: