~ Forums of Enroth ~
Would you like to react to this message? Create an account in a few clicks or log in to continue.

~ Forums of Enroth ~

The Enroth diehard fan community
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» [H3SW v0.8.2] Witch Hunt
[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Icon_minitimeby GodRage Yesterday at 22:56

» 5Kings1Ring
[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Icon_minitimeby GodRage Yesterday at 22:54

» Polskie powitanie
[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Icon_minitimeby rrravyn 2024-11-15, 09:53

» loading simplification
[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Icon_minitimeby badtoper 2024-11-15, 04:37

» Easier Troop Management Between Garrison and Hero in Town
[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Icon_minitimeby badtoper 2024-11-15, 04:05

» Improvements for Hero Management and Turn Confirmation
[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Icon_minitimeby badtoper 2024-11-15, 01:57

» [H3SW v0.8.2] Desert Isle
[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Icon_minitimeby Sir Albe 2024-10-31, 07:56

Poll
Global announcements should be:
Everlasting, 1 for each project.
[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Redbar110%[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Redbar12
 0% [ 0 ]
Temporary, when there is something new to announce.
[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Redbar11100%[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Redbar12
 100% [ 6 ]
Holalala... No idea where the Ultimate artifact is.
[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Redbar110%[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Redbar12
 0% [ 0 ]
Total Votes : 6
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
Introduce yourself
H3SW General Discussion
H3SW Map List: Work in progress
H3SW: Dwelling Development
The Floody Land
Forum Admins Feed
Enrothian Fan Art
Heroes III: The Succession Wars v0.8.2 Beta

 

 [Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more

Go down 
AuthorMessage
Unknown_Hero
Mage
Mage
Unknown_Hero


Messages : 780
Quality Points : 78
Registration Date : 2015-09-06

[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Empty
PostSubject: [Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more   [Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more Icon_minitime2017-03-18, 06:55

GetResourceGeneratorOwner(type, x, y)
type: the ID of the location (see section "Locations").
x: X coordinate on the world map.
y: Y coordinate on the world map.

Returns the owner of the specified resource generator as an integer (0-5), or returns "-1" if the resource generator is not owned by any player.

SetResourceGeneratorOwner(type, x, y, player)
type: the ID of the location (see section "Locations").
x: X coordinate on the world map.
y: Y coordinate on the world map.
player: the player you wish to select.

Sets the specified player (0-5) to become the owner of the specified resource generator.

Using value of "-1" for player, the resource generator is not owned by any player.

Using values of "-1" for x and y, all the resource generators of the same type on the map are affected at the same time.

*

CastSpellOnResourceGenerator(type, x, y, spell, power, player, control)
type: the ID of the location (see section "Locations").
x: X coordinate on the world map.
y: Y coordinate on the world map.
spell: the spell ID you want to cast on the resource generator (see section "Spells"). Currently, it can be the "Haunt" spell and the four "Set Elemental Guardian" spells.
power: the Spell Power to which the spell will be cast.
player: affects the resource generator only if the specified player (0-5) is the owner of the resource generator. Using value of "-1" for player, only the resource generator not owned by a player is affected. Can also be left empty, all the resource generators of the specified type will be affected regardless of who controls the resource generator.
control: can be set to "0" or "1".
- "0" if the resource generator is controlled by a player, he loses control of the resource generator.
- "1" if the resource generator is controlled by a player, he keeps control of the resource generator.

Casts the specified spell at the specified Spell Power on the specified resource generator if the specfied player is the owner of the resource generator. The player can keep control of the resource generator or not (player flag).

Examples of use:

CastSpellOnResourceGenerator(LOCATION_MINE, 10, 25, SPELL_HAUNT, 10, 3, 1);

If the resource generator is owned by the player "3", 40 Ghosts (10 * 4) are generated on the mine located at (10, 25). The player keeps control of the mine (the mine continues to give resources to the player every day).

*

Using values of "-1" for x and y, all the resource generators of the same type on the map are affected at the same time.

CastSpellOnResourceGenerator(LOCATION_MINE_CRYSTAL, -1, -1, SPELL_SET_FIRE_GUARDIAN, 10, 3, 0);

For all the resource generators of the specified type and owned by the player "3", 40 Fire Elementals (10 * 4) are generated. The player loses control of the resource generators.

*

Leaving the value for player empty, all the resource generators of the same type on the map are affected regardless of who controls the resource generators.

CastSpellOnResourceGenerator(LOCATION_MINE_CRYSTAL, -1, -1, SPELL_SET_FIRE_GUARDIAN, 10, , 0);

For all the resource generators of the specified type, 40 Fire Elementals (10 * 4) are generated. All the players lose control of the resource generators.
Back to top Go down
 
[Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more
Back to top 
Page 1 of 1
 Similar topics
-
» [Script System][Suggestions] GetLocationSpell(type, x, y) and more
» [Script System][Suggestions] SetLocationState(type, x, y, state)
» [Script System][Suggestions] GetNumTowns(player, type, faction) and more
» [Script System][Suggestions] GetUserDifficultyChoice() and more
» [Script System][Suggestions] BattleGetCurrentTurn() and more

Permissions in this forum:You cannot reply to topics in this forum
~ Forums of Enroth ~ :: Modding Guild :: Heroes of Might and Magic II: Project Ironfist :: Modding and Mapmaking-
Jump to: