# How to disable shared XP gain?

Status
Not open for further replies.

#### hiphopaznkid

Level 4
how can i make it share but not split so it doesnt divide 50 exp between 8 people?

#### GolluM_KoMe

Level 15
I think you can't do it directly, but you might count how many heroes are there in an area and increases the experience rate for the players, according to the number of heroes in the area owned by different players. Sorry if you don't understand, I didn't explain it quite well.

#### hiphopaznkid

Level 4
how can i increase the experience rate?

#### GolluM_KoMe

Level 15
here is an example :
• -------- Considered hero : UNIT, owned by PLAYER --------
• Set INTEGER = 0
• Set POINT = (Position of UNIT)
• For each (Integer A) from 1 to 12, do (Actions)
• Boucle - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Number of units in (Units within 1800.00 of POINT matching ((((Matching unit) is A hero) Egal Ã* TRUE) and ((Owner of (Matching unit)) Egal Ã* (Player((Integer A))))))) SupÃ©rieur Ã* 0
• So - Actions
• Set INTEGER = (INTEGER + 1)
• Else - Actions
• Hero - Make PLAYER Heroes gain (100.00 x (Real(INTEGER)))% experience from future kills
• Custom script: call RemoveLocation(udg_POINT)
Sorry for the french stuff xD

#### hiphopaznkid

Level 4
here is an example :
• -------- Considered hero : UNIT, owned by PLAYER --------
• Set INTEGER = 0
• Set POINT = (Position of UNIT)
• For each (Integer A) from 1 to 12, do (Actions)
• Boucle - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Number of units in (Units within 1800.00 of POINT matching ((((Matching unit) is A hero) Egal Ã* TRUE) and ((Owner of (Matching unit)) Egal Ã* (Player((Integer A))))))) SupÃ©rieur Ã* 0
• So - Actions
• Set INTEGER = (INTEGER + 1)
• Else - Actions
• Hero - Make PLAYER Heroes gain (100.00 x (Real(INTEGER)))% experience from future kills
• Custom script: call RemoveLocation(udg_POINT)
Sorry for the french stuff xD
i cant find
• Set POINT = (Position of UNIT)
• (Number of units in (Units within 1800.00 of POINT matching ((((Matching unit) is A hero) Egal Ã* TRUE) and ((Owner of (Matching unit)) Egal Ã* (Player((Integer A))))))) SupÃ©rieur Ã* 0
• Hero - Make PLAYER Heroes gain (100.00 x (Real(INTEGER)))% experience from future kills

#### GolluM_KoMe

Level 15
POINT; PLAYER; INTEGER are 3 variables of type : position; player ; integer

"Number of units in" is an Integer condition

search in the Hero section in the actions, there should be the third action u pointed

#### rysnt11

Level 17
i cant find
• Set POINT = (Position of UNIT)
• (Number of units in (Units within 1800.00 of POINT matching ((((Matching unit) is A hero) Egal Ã* TRUE) and ((Owner of (Matching unit)) Egal Ã* (Player((Integer A))))))) SupÃ©rieur Ã* 0
• Hero - Make PLAYER Heroes gain (100.00 x (Real(INTEGER)))% experience from future kills
That should be under unit group

#### hiphopaznkid

Level 4
i cant find position of unit for Set POINT = (Position of UNIT)

#### GolluM_KoMe

Level 15
In fact, each time you use a position (like Move the unit at center of region REGION) (center of REGION is a position), it leaks; it means the point remains on the map, and the more there are points, the more it lags, so you create first a variable POINT (which is a position), you set it (there I set it as the position of the hero), then you use it in an action, and to finish you delete it (with Custom script: call RemoveLocation(udg_POINT) ). So the position is deleted and it wont create lag . You must do this each time u use a position.
there are also other things that leak : Check this forum to know what leaks and how to avoid lag

#### hiphopaznkid

Level 4
its not working its still giving me 4 exp when all players are near by

#### Dr Super Good

Spell Reviewer
Level 64
In gameplay constants I believe you can set it so that it awards bonus EXP the more units that are affected. Otherwise just trigger it.

#### hiphopaznkid

Level 4
• Exp Rate
• Events
• Conditions
• Actions
• Set Exp = 0
• Set Point = (Position of Unit)
• For each (Integer A) from 1 to 12, do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• ((Number of units in (Units within 1800.00 of TempPoint matching (((Matching unit) is A Hero) Equal to True))) Equal to 0) and ((Owner of (Matching unit)) Equal to (Player(Exp)))
• Then - Actions
• Set Exp = (Exp + 1)
• Else - Actions
• Hero - Make Player Heroes gain 1500.00% experience from future kills
• Custom script: call RemoveLocation(udg_Point)

#### GolluM_KoMe

Level 15
• Exp Rate
• Events
• Conditions
• Actions
• Set Exp = 0
• Set Unit = Your hero
• Set Point = (Position of Unit)
• Set Player = Owner of Unit
• For each (Integer A) from 1 to 12, do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• ((Number of units in (Units within 1800.00 of Point matching (((Matching unit) is A Hero) Equal to True))) HigherThan 0) and ((Owner of (Matching unit)) Equal to (Player(Integer A)))
• Then - Actions
• Set Exp = (Exp + 1)
• Else - Actions
• Hero - Make Player Heroes gain (100x(Real(Exp))) experience from future kills
• Custom script: call RemoveLocation(udg_Point)
This is better
You also need an event !! Or it will never be triggered
(like Every 3 seconds)

#### Chewii

Level 11
You have no event?

EDIT:Nvm gollum here posted it before me :>

#### hiphopaznkid

Level 4
it froze the game after 3 sec
this is what i have now
• Exp Rate
• Events
• Time - Elapsed game time is 3.00 seconds
• Conditions
• Actions
• Set Exp = 0
• Set Unit = Hero
• Set Point = (Position of Unit)
• Set Player = (Owner of Unit)
• For each (Integer A) from 1 to 12, do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• ((Number of units in (Units within 1800.00 of TempPoint matching (((Matching unit) is A Hero) Equal to True))) Equal to 0) and ((Owner of (Matching unit)) Equal to (Player(IntegarA)))
• Then - Actions
• Set Exp = (Exp + 1)
• Else - Actions
• Hero - Make Player Heroes gain (100.00 x (Real(Exp)))% experience from future kills
• Custom script: call RemoveLocation(udg_Point)

#### Chewii

Level 11
Set Unit = Hero Who's Hero? is that a variable? or what is it?

((Number of units in (Units within 1800.00 of TempPoint matching (((Matching unit) is A Hero) Equal to True))) Equal to 0) and ((Owner of (Matching unit)) Equal to (Player(IntegarA)))

The temp point??? i can't see it set there.

Offtopic; Dude im serious about that quote
''Jass is like taking the long, treacherous, and exhausting path up the mountain, while GUI is like taking the catapult''

Just kidding, isn't it awesome ?

#### hiphopaznkid

Level 4
Set Unit = Hero Who's Hero? is that a variable? or what is it?

((Number of units in (Units within 1800.00 of TempPoint matching (((Matching unit) is A Hero) Equal to True))) Equal to 0) and ((Owner of (Matching unit)) Equal to (Player(IntegarA)))

The temp point??? i can't see it set there.

Offtopic; Dude im serious about that quote
''Jass is like taking the long, treacherous, and exhausting path up the mountain, while GUI is like taking the catapult''
Hero is a variable. unless it is suppose to be a hero

#### Chewii

Level 11
Yes but did you set a hero into the hero variable, and do you have a temp point variable as i mentioned in my other post?

#### hiphopaznkid

Level 4
but what if i have more than one type of hero in my map. do i have to make one for each one? is it suppose to be temp point or something else?

#### Chewii

Level 11
Well you could make a Hero variable with some arrays. and you put hero[1] = Hero owned by red
hero[2] = hero owned by blue etc for a easy way, but there more ways on doing this. I can maybe look later on this trigger.

#### hiphopaznkid

Level 4
how do i make a hero variable because i tried and i cant find the hero type for the variable? also in monster master rpg everyone gets exp (when near by) but it splits between your monsters not the other players.

#### GolluM_KoMe

Level 15
the hero type for the variable?
It's unit
also in monster master rpg everyone gets exp (when near by) but it splits between your monsters not the other players.
Try to ask the maker; plus, the map might be unprotcted.
Btw, I advise you to first learn the basics of triggering, you'll be able to make everything by urself (and save a lot of time)

#### Chewii

Level 11
I agree with gollum its also much fun
I remember my first MUI spell ^^

#### hiphopaznkid

Level 4
It's unit
Btw, I advise you to first learn the basics of triggering, you'll be able to make everything by urself (and save a lot of time)
Do you know a good place to learn the basics i know a little but it ends up failing. Also the trigger still isnt working it closes warcraft in the first 2 seconds.

#### GolluM_KoMe

Level 15
Do you know a good place to learn the basics i know a little but it ends up failing.
Actually, I think forums where u can learn stuff are just made to help u in a specific situation. I learnt almost everything by myself, which is very satisfying, but also faster as u remember much better. It's just an advice; Otherwise , check the forums of the Hive, I'm sure u ll find basics on triggering

#### Chewii

Level 11
When i started to learn, i watched mass threads from ppl that needs help. And i learned so much from that.
Guess what. I got bored this fine evening and i had nothing to do so i made the trigger for you

Here are the Triggers
• CoolDown
• Events
• Time - Every 1.00 seconds of game time
• Conditions
• Actions
• Trigger - Turn on Xp Trigger <gen>

• Xp Trigger
• Events
• Unit - A unit Is attacked
• Conditions
• Actions
• Set Index = (Index + 1)
• Set Integer[Index] = 0
• Set Point[Index] = (Position of (Attacked unit))
• Set UnitGroup[Index] = (Units within 500.00 of Point[Index] matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Attacking unit))) Equal to True)))
• Unit Group - Pick every unit in UnitGroup[Index] and do (Actions)
• Loop - Actions
• Set Integer[Index] = (Number of units in UnitGroup[Index])
• Hero - Make (Owner of (Picked unit)) Heroes gain (100.00 x (Real(Integer[Index])))% experience from future kills
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Index Equal to 1000
• Then - Actions
• Set Index = 0
• Else - Actions
• Custom script: call RemoveLocation(udg_Point[udg_Index])
• Custom script: call DestroyGroup(udg_UnitGroup[udg_Index])
• Trigger - Turn off (This trigger)
And here's the map. I hope this is how you like it. And if there's any bugs please let me know

#### Attachments

• Share Xp.w3x
18.8 KB · Views: 39

#### hiphopaznkid

Level 4
thank you, it works.

#### Chewii

Level 11
Anytime :>

Status
Not open for further replies.

Replies
2
Views
774
Replies
5
Views
1K
Replies
3
Views
2K
Replies
3
Views
941
Replies
5
Views
1K