| 10-19-2004, 12:05 AM | #1 |
Ok, In my AoS you can buy a item to increase your experience rate by 5% when you buy it. But for some reason, when you buy it the experience rate gones from 100 to 1005 instead of from 100 to 105, could you please help me and tell me why? ok here are the triggers, help please Here I Tell the Variable that the starting exp is 100 Code:
Set Varix
Events
Map initialization
Conditions
Actions
Set ExperienceGainPlus[1] = 100
Set ExperienceGainPlus[2] = 100Now this is the trigger that happens when you buy the item Code:
Experience Rate
Events
Unit - Recruitment 0066 <gen> Sells an item (from shop)
Unit - Recruitment 0057 <gen> Sells an item (from shop)
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Buying unit) Equal to Playerblue
(Buying unit) Equal to PlayerTeal
(Buying unit) Equal to PlayerPurple
(Buying unit) Equal to PlayerYellow
(Buying unit) Equal to PlayerOrange
Then - Actions
Neutral Building - Add Experience Rate to Recruitment 0066 <gen> with 0 in stock and a max stock of 10
Item - Remove (Sold Item)
Set ExperienceGainPlus[1] = (ExperienceGainPlus[1] + 5)
Hero - Make Player 2 (Blue) Heroes gain (Real(ExperienceGainPlus[1]))% experience from future kills
Hero - Make Player 3 (Teal) Heroes gain (Real(ExperienceGainPlus[1]))% experience from future kills
Hero - Make Player 4 (Purple) Heroes gain (Real(ExperienceGainPlus[1]))% experience from future kills
Hero - Make Player 5 (Yellow) Heroes gain (Real(ExperienceGainPlus[1]))% experience from future kills
Hero - Make Player 6 (Orange) Heroes gain (Real(ExperienceGainPlus[1]))% experience from future kills
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Buying unit) Equal to PlayerPink
(Buying unit) Equal to PlayerGrey
(Buying unit) Equal to PlayerLightBlue
(Buying unit) Equal to PlayerDarkGreen
(Buying unit) Equal to PlayerBrown
Then - Actions
Neutral Building - Add Experience Rate to Recruitment 0066 <gen> with 0 in stock and a max stock of 10
Item - Remove (Sold Item)
Set ExperienceGainPlus[2] = (ExperienceGainPlus[2] + 5)
Hero - Make Player 8 (Pink) Heroes gain (Real(ExperienceGainPlus[2]))% experience from future kills
Hero - Make Player 9 (Gray) Heroes gain (Real(ExperienceGainPlus[2]))% experience from future kills
Hero - Make Player 10 (Light Blue) Heroes gain (Real(ExperienceGainPlus[2]))% experience from future kills
Hero - Make Player 11 (Dark Green) Heroes gain (Real(ExperienceGainPlus[2]))% experience from future kills
Hero - Make Player 12 (Brown) Heroes gain (Real(ExperienceGainPlus[2]))% experience from future kills
Else - Actions
Do nothing |
| 10-19-2004, 12:15 AM | #2 |
maybe cuz 100+5 = 105...? and ur telling it to give 105% from future kills... |
| 10-19-2004, 12:21 AM | #3 |
uh sweet5, but its not 105 actually its 1005, and Im asking why it is 1005? it should be 105 but I have trigger to check what its is and it says its 1005, 100% is normal exp rate isnt it? well 0 is nothing so yeah, 100% is normal. Im asking why it turns 1005% instead of 105%? Please answer... |
| 10-19-2004, 02:22 AM | #4 |
I dont know why you are using all these variables, it seems unnecesary, unless they stack...? IF they stack, i have an idea. You could create a interger variable, 1 for team 1 and 1 for team 2. Everytime team one buys the item set the interger up one level. then use if/then/else to pick up the interger level and do: If (Team1Variable) = 1 Then set experience gained by player group - all allies of player? - to 105%. If (Team1Variable) = 2 Then set experience gained by player group - all allies of player? - to 110%. etc... |
| 10-19-2004, 04:02 AM | #5 |
that is really wierd,its acting like a string.. try setting it to +10 instead of 5 and see what happens. |
| 10-19-2004, 12:32 PM | #6 | |
Quote:
![]() |
| 10-19-2004, 04:00 PM | #7 |
Set ExperienceGainPlus[1] = 105 ? just try setting it to what you want now. how do you know what percent it is setting it to? |
| 10-19-2004, 04:14 PM | #8 |
I do at start have anotehr trigegr thats sets both exprate variables to 100, then I want it to be +5 so it will be 105, 110 etc when you buy that item. EDIT: Hey IM gonna try to use integer dont reply yet EDIT2:I fixed everything, thanks. |
| 10-19-2004, 04:54 PM | #9 |
um.. what were u using? |
| 10-19-2004, 05:52 PM | #10 |
Yeah, what where you using? You should use integer in a trigger like this. |
| 10-19-2004, 10:33 PM | #11 | |
Quote:
|
