~ Forums of Enroth ~

An Enroth diehard fan community
 
HomeHome  ChatChat  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» Ragoon's Graphics For HoMM3SW
by robizeratul Today at 22:52

» H3SW: General Graphics discussion
by robizeratul Today at 11:54

» Creature Quest – The New Adventure from JVC (feat some old NWC members)
by Galaad 2017-10-13, 20:34

» Modding Questions
by GodRage 2017-10-12, 18:32

» Introduce yourself
by Orzie 2017-10-12, 17:10

» [Ironfist ver 1.3.0] Sorrow's End map - Sprites of creatures missing on the adventure map
by Kristo 2017-10-12, 15:13

» [EN, RU][Offline] HoMM1 Main Tourney 2017-2 (Общий Турнир)
by Orzie 2017-10-11, 18:14

Poll
"Wait" in HoMM2?
Yes
80%
 80% [ 45 ]
No
20%
 20% [ 11 ]
Total Votes : 56
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
H3SW General Discussion
H3SW: Dwelling Development
H3SW Map List: Work in progress
Dervish Faction General Concept
Enrothian Fan Art
H3SW Recruitment Point - Enroth Needs You!
Серия книг "Земли Меча и Магии"
Heroes of Might and Magic 3: The Succession Wars - General info

Share | 
 

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

View previous topic View next topic Go down 
AuthorMessage
Unknown_Hero
Minotaur
Minotaur
avatar

Messages : 344
Quality Points : 40
Registration Date : 2015-09-06

PostSubject: [Script System][Suggestions] GetResourceGeneratorOwner(type, x, y) and more   2017-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
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» [Script System][Suggestions] So, which expressions are the most desirable?
» One Woman in India dies every hour due to the dowry system
» Minecraft's Coordinate System
» Danny O'Donoghue
» Award system

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: