| 03-11-2006, 10:30 PM | #1 |
I'm creating an intelligent attribute- adding system, which, when i level up, a dialog will appear with three buttons- agility, strength, and intelligence. It will give 3 attribute points to spend per level. So far, i have gotten a single attribute type done, but all the triggers need to be reworked completely. heres what i have (3 triggers) #1 Hero gain value add Events Unit - A unit Gains a level Conditions Or - Any (Conditions) are true Conditions (Unit-type of (Leveling Hero)) Equal to Elf (Unit-type of (Leveling Hero)) Equal to Human (Unit-type of (Leveling Hero)) Equal to Human Female (Unit-type of (Leveling Hero)) Equal to Orc (Unit-type of (Leveling Hero)) Equal to Troll Actions Unit - Set the custom value of (Leveling Hero) to 3 Trigger - Run Stats base str3 <gen> (ignoring conditions) #2Stats base str3 Events Conditions Actions Dialog - Change the title of aaa_attribute_add_menu to (Add Attributes + |c00a7c7c7+3) Dialog - Create a dialog button for aaa_attribute_add_menu labelled Strength Set aaa_Str_Add = (Last created dialog Button) Dialog - Create a dialog button for aaa_attribute_add_menu labelled Agility Set aaa_agil_Add = (Last created dialog Button) Dialog - Create a dialog button for aaa_attribute_add_menu labelled Intelligence Set aaa_Int_Add = (Last created dialog Button) Dialog - Show aaa_attribute_add_menu for (Triggering player) Wait 1.00 seconds Dialog - Clear aaa_attribute_add_menu Trigger - Turn on Adding Str3 sub <gen> Trigger - Run Adding Str3 sub <gen> (checking conditions) #3 Adding Str3 sub Events Dialog - A dialog button is clicked for aaa_attribute_add_menu Conditions (Clicked dialog button) Equal to aaa_Str_Add Actions Dialog - Clear aaa_attribute_add_menu Hero - Modify Strength of (Random unit from (Units owned by (Triggering player))): Add 1 Trigger - Run Stats base str2 <gen> (ignoring conditions) Trigger - Turn off (This trigger) And the triggers go on like this, activating 2 more series. I am trying to make this just like dark lineage's system. Any help would be great. |
| 03-11-2006, 10:41 PM | #2 |
So what doesnt work? |
| 03-12-2006, 07:39 AM | #3 |
Firstly: Dialog - Change the title of aaa_attribute_add_menu to (Add Attributes + |c00a7c7c7+3) |c00a7c7c7+3 ....? This doesn't make any sense what so ever. This supposed to be colour code? If so, you didn't close it with |r. Secondly: Trigger - Run Stats base str2 <gen> (ignoring conditions) What is this? Thirdly, you haven't actually created any dialog menus. Do that at 1 second elapsed, and create the buttons and set them to variables. Then don't clear the dialog menus - there is no point in this application, since they are not dynamic. After you create the trigger to make the dialog menu, have this (there is no point in turning the second trigger on/off, since if the dialog is up, then the trigger should be on): #1 Hero gain value add Events Unit - A unit Gains a level Conditions Or - Any (Conditions) are true Conditions (Unit-type of (Leveling Hero)) Equal to Elf (Unit-type of (Leveling Hero)) Equal to Human (Unit-type of (Leveling Hero)) Equal to Human Female (Unit-type of (Leveling Hero)) Equal to Orc (Unit-type of (Leveling Hero)) Equal to Troll Actions Unit - Set the custom value of (Leveling Hero) to 3 Dialog - Change the title of aaa_attribute_add_menu to (Add Attributes + |c00a7c7c7+3) // Remember to fix whatever you tried to do here Dialog - Show aaa_attribute_add_menu for (Owner of unit (Leveling Hero)) #3 Adding Str3 sub Events Dialog - A dialog button is clicked for aaa_attribute_add_menu Conditions Actions Set Variable - TempGroup = (Units owned by (Triggering Player) matching ((Matching unit) Is equal to (A hero))) Unit Group - Pick every unit in TempGroup and do multiple actions: Loop If: (Clicked dialog button) Equal to aaa_Str_Add Then: Hero - Modify Strength of (Picked unit): Add 1 Else: If: (Clicked dialog button) Equal to aaa_Agi_Add Then: Hero - Modify Agility of (Picked unit): Add 1 Else: If: (Clicked dialog button) Equal to aaa_Int_Add Then: Hero - Modify Intelligence of (Picked unit): Add 1 Else: |
| 03-12-2006, 08:12 AM | #4 | |
Quote:
|
| 03-12-2006, 01:55 PM | #5 | |
Quote:
How do i get this to end and go away once i have added 3 attribute points? |
| 03-12-2006, 02:33 PM | #6 |
Just have an array of integers (one for each player). Set it to 3 at the begining (you can link this into the string if you want), and then decrease it by one each time. When it is 0, don't show the dialog again. |
| 03-12-2006, 10:21 PM | #7 |
Alright, your idea did work, and i love it, btw, but i was wondering how to link the trigger array variables in to a trigger, if that is what you mean. If not, then i cant really think of any way to put this together. |
| 03-13-2006, 06:19 AM | #8 |
#1 Hero gain value add Events Unit - A unit Gains a level Conditions Or - Any (Conditions) are true Conditions (Unit-type of (Leveling Hero)) Equal to Elf (Unit-type of (Leveling Hero)) Equal to Human (Unit-type of (Leveling Hero)) Equal to Human Female (Unit-type of (Leveling Hero)) Equal to Orc (Unit-type of (Leveling Hero)) Equal to Troll Actions Unit - Set the custom value of (Leveling Hero) to 3 Set ARRAY[player number of (owner of (leveling hero))] = 3 Dialog - Change the title of aaa_attribute_add_menu to (Add Attributes + |c00a7c7c7(Covert Integer to String(ARRAY[player number of (owner of (leveling hero))]) // See here Dialog - Show aaa_attribute_add_menu for (Owner of unit (Leveling Hero)) #3 Adding Str3 sub Events Dialog - A dialog button is clicked for aaa_attribute_add_menu Conditions Actions Set ARRAY[player number of (owner of (leveling hero))] = ARRAY[player number of (owner of (leveling hero))] - 1 Set Variable - TempGroup = (Units owned by (Triggering Player) matching ((Matching unit) Is equal to (A hero))) Unit Group - Pick every unit in TempGroup and do multiple actions: Loop If: (Clicked dialog button) Equal to aaa_Str_Add Then: Hero - Modify Strength of (Picked unit): Add 1 Else: If: (Clicked dialog button) Equal to aaa_Agi_Add Then: Hero - Modify Agility of (Picked unit): Add 1 Else: If: (Clicked dialog button) Equal to aaa_Int_Add Then: Hero - Modify Intelligence of (Picked unit): Add 1 Else: If: ARRAY[player number of (Triggering Player))] = 0 Then: Skip Remaining Actions Else: Dialog - Change the title of aaa_attribute_add_menu to (Add Attributes + |c00a7c7c7(Covert Integer to String(ARRAY[player number of Triggering Player]) // See here Dialog - Show aaa_attribute_add_menu for (Triggering Player) |
| 03-13-2006, 11:03 PM | #9 |
i tried what you said, doesnt seem to be working, i have it the exact same way you do- some things i wasnt quite sure on- 1. Is ARRAY an array integral variable? if so, what number do i set it at? i figured it didnt matter, so i set it to 0 2. At the very last part of the trigger series, where it starts the temp group loop setting- is the part you added on part of the if/then/else picking up where the old one left off? Is it under the loop setting as a separate function? or is it by itself as a if/then/else multiple function- couldnt get it to work with a normal if/then/else because it had an extra function at the end. anyways- this is what i have for triggers-(copied as text)- from what you made, tell me if i made any mistakes #1 Hero gain value add Hero gain att add Events Unit - A unit Gains a level Conditions Or - Any (Conditions) are true Conditions (Unit-type of (Leveling Hero)) Equal to Elf (Unit-type of (Leveling Hero)) Equal to Human (Unit-type of (Leveling Hero)) Equal to Human Female (Unit-type of (Leveling Hero)) Equal to Orc (Unit-type of (Leveling Hero)) Equal to Troll Actions Set ARRAY3[(Player number of (Owner of (Leveling Hero)))] = 3 Dialog - Change the title of aaa_attribute_add_menu to (Add Attributes + ( |c008fd229+ + (String(ARRAY3[(Player number of (Owner of (Leveling Hero)))])))) Dialog - Show aaa_attribute_add_menu for (Owner of (Leveling Hero)) #3 Adding Str3 sub Adding Attributes Events Dialog - A dialog button is clicked for aaa_attribute_add_menu Conditions Actions Set ARRAY3[(Player number of (Owner of (Leveling Hero)))] = ARRAY3[((Player number of (Owner of (Leveling Hero))) - 1)] Set Temp_Group = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) Unit Group - Pick every unit in Temp_Group and do (Actions) Loop - Actions If ((Clicked dialog button) Equal to aaa_Str_Add) then do (Hero - Modify Strength of (Picked unit): Add 1) else do (If ((Clicked dialog button) Equal to aaa_agil_Add) then do (Hero - Modify Agility of (Picked unit): Add 1) else do (If ((Clicked dialog button) Equal to aaa_Int_Add) then do (Hero - Modify Intelligence of (Picked unit): Add 1) else do (If (ARRAY3[(Player num |
| 03-14-2006, 01:00 PM | #10 |
Please use the trigger tags. btw. In your #3 Adding Str3 sub trigger. Change [(Player number of (Owner of (Leveling Hero)))] to [player number of (Triggering Player))] |
| 03-14-2006, 04:13 PM | #11 |
So what isn't working? Saying 'it doesn't work' really doesn't help me. Put in some debug messages to see what's happening. |
| 03-14-2006, 10:02 PM | #12 |
I gave you about a half of a page saying what is not working, you just have to read it, scroll up a bit. |
| 03-15-2006, 01:17 AM | #13 |
Which part is not working? What's not happening that you want to happen? Have you tried using debug messages as Griffen suggested so you can narrow down the problem and give us more specific information? Also use the Trigger tags..would make it a lot easier to read. |
