Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 5 - Modders Workshop > Thread: ~ QUESTIONS Topic and FAQ - Modders Workshop ~
Thread: ~ QUESTIONS Topic and FAQ - Modders Workshop ~ This Popular Thread is 126 pages long: 1 20 40 60 ... 66 67 68 69 70 ... 80 100 120 126 · «PREV / NEXT»
Matrix4767
Matrix4767


Adventuring Hero
posted July 13, 2009 10:07 PM

Can I put music from Heroes III in V?I really wish I can hear Necropolis's epic theme from 3 in 5.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
SimonaK
SimonaK


Promising
Supreme Hero
posted July 13, 2009 10:32 PM
Edited by SimonaK at 22:33, 13 Jul 2009.

Quote:
Can I put music from Heroes III in V?I really wish I can hear Necropolis's epic theme from 3 in 5.

yes you can,
I've integrated music from II,III and IV and even King Bounty's ones...

look around, you will be able to find the good threads for...


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
shvihka
shvihka

Tavern Dweller
posted July 16, 2009 01:51 PM

I have a question.

I've tried to switch Matrons and its upgrades with Manticores and its upgrades,now the Manticore does appear when you buy the lv6 building but it's stats are the same(and I modified them)and its upgrades don't appear at all so I want to ask,what am i doing wrong?

Would appreciate when someone explains me how to do it.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
KeeperMustDie
KeeperMustDie

Tavern Dweller
posted July 16, 2009 08:53 PM

Hi,
I'm sorry if someone already asked this question, but I tried search and didn't find any. I want change the statistics of spells for heroes, but AFAIK units uses same spells as heroes. Is there any way, for example, to change mana cost and spell damage for hero and leave unchanged spell to unit? Thanks.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Seiat
Seiat


Hired Hero
posted July 17, 2009 03:20 AM

Hi, i know this is the wrong section of the forum... but I don't think anyone's gonna answer anyways, so here's my question:

I'm trying to get a messagebox to pop up when the hero touches an object (it's a signpost modeled as a pit lord)

this is my script

SetObjectEnabled("Mentor1", false);

if GetCurrentPlayer () == PLAYER_1 then
MessageBox("Maps/SingleMissions/Devils Children/1Murray.txt");
trigger( OBJECT_TOUCH_TRIGGER, Mentor1);
end;
end;

Where'd I go wrong?
my guess is the trigger

anyone who can help me out?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Warmonger
Warmonger


Promising
Legendary Hero
fallen artist
posted July 17, 2009 06:56 AM
Edited by Warmonger at 07:04, 17 Jul 2009.

You need to define a function and trigger this specific function. Your code does not give an info that this action is linked to object Mentor1.


function PokeIt ()
  if GetCurrentPlayer () == PLAYER_1 then
      MessageBox ("Maps/SingleMissions/DevilsChildren/1Murray.txt");
  end;
end;

Trigger (OBJECT_TOUCH_TRIGGER, "Mentor1", "PokeIt");


Do not use space in filenames. Instead, use console to get 5+ errors on the previous code.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Seiat
Seiat


Hired Hero
posted July 18, 2009 01:19 AM

Well that explains why it didn't want to work, and also opens up a whole crapload of possibilities, that I thank you for... but oddly enough, the message box still doesn't pop up, even after renaming the folder "Devils Children" without the space...

maybe i'm missing something else

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Cepheus
Cepheus


Honorable
Legendary Hero
Far-flung Keeper
posted July 18, 2009 01:40 AM

I can't tell right now whether your script is bug-free but I've similarly worked with message boxes before.  One problem that took me days to discover is that you can't simply create a .txt file on your desktop or wherever and place it in the folder you've linked to: you need to create the .txt using the Editor to get it to work.  I don't know why, but that's how it is.  To do it "properly" you should access the Map Properties Tree, click any Value field with a .txt file in it and then click "New".  Write your text in here, save it and it'll be considered a "compatible" .txt file which will work in scripts.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Seiat
Seiat


Hired Hero
posted July 18, 2009 02:48 AM

seems that didn't work either.. Is it possible that because I have the object play a creature sound upon interaction(not in the script, done from the 'shared' parameter) that it cancels out my script? i'm going to keep toying with this one, i'll let u guys know what the problem is if i ever figure it out... thanx for the help though, Warmonger and Cepheus.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Warmonger
Warmonger


Promising
Legendary Hero
fallen artist
posted July 18, 2009 09:21 AM
Edited by Warmonger at 09:24, 18 Jul 2009.

Maybe you just tell us what console says? Now it's just a matter of debugging.

I also suggest using this tool for any further scripting.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Seiat
Seiat


Hired Hero
posted July 18, 2009 09:43 AM

No worries, I made a few changes and figured it out... here's what the correct code looks like

function ment (heroname)


if GetCurrentPlayer () == PLAYER_1 then
MessageBox("Maps/SingleMissions/Devils Children/Murray1.txt");
Trigger(OBJECT_TOUCH_TRIGGER, "mentor1", nil );
end;
end;


Trigger (OBJECT_TOUCH_TRIGGER, "mentor1", "ment" );

But thanks, Warmonger, take my word for it that your help has been greatly appreciated

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Seiat
Seiat


Hired Hero
posted July 18, 2009 10:21 AM

but seeing as your so willing... ... maybe you could help me with another small task? (I know I'm a pain in the arse)

Now I'm trying to add hero stats upon touching this object, IF the hero has a certain color of border key... I'm not gonna ask for the code, i'd like to try to figure it out on my own... but i don't know the function to add stats (attack/defense etc)

i looked in the manual, the closest thing I saw was GetHeroStat... but that looks like more of a function to determine what stat the hero has rather then adding stats...

Any suggestions?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Seiat
Seiat


Hired Hero
posted July 19, 2009 06:28 AM

I was just teasing about that last one, just to bug ya's lol... but now I have an actual question. Is it possible to set it so you can return to the same object and have it pop up a second msgbox as well as other possible functions under certain circumstances? I mean, of course, if a certain something has been fulfilled... for example, finding a border guard key...

Here's what it looks like altogether (it's a tad bugged)

function ment (heroname)

if GetCurrentPlayer () == PLAYER_1 then
MessageBox("Maps/SingleMissions/Devils Children/Murray1.txt");
Trigger(OBJECT_TOUCH_TRIGGER, "mentor1", nil );
end;
end;

Trigger (OBJECT_TOUCH_TRIGGER, "mentor1", "ment" );

function menta (heroname)

if GetCurrentPlayer () == PLAYER_1 then
if HasBorderguardKey(PLAYER_1, ORANGE_KEY) then
RemoveObject("hellpike1");
sleep(1)
MessageBox("Maps/SingleMissions/Devils Children/Murray2.txt");
Trigger(OBJECT_TOUCH_TRIGGER, "mentor1", nil );
end;
end;
end;

Trigger(OBJECT_TOUCH_TRIGGER, "mentor1", "menta" );

I've tried about 25 different variations of this, making slight changes, moving the hasborderguardkey func. out of function menta, or sticking the second 'trigger' into the 'hasborderguardkey' thread, among other things... but the end result is either function 'ment' works or function 'menta' works, or neither work.. but never both... this script's the closest tho... I'm 99% sure my error has something to do with having two triggers with the same object... Isn't there a way to define the two triggers so they're somehow different, but react from the same object? I think I may need a good nights rest... if u know what i'm smoking know what i'm doing wrong let me know... I'll owe you a favor somehow, some way.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Warmonger
Warmonger


Promising
Legendary Hero
fallen artist
posted July 19, 2009 07:31 AM
Edited by Warmonger at 20:12, 19 Jul 2009.

You can have only one trigger of the same type. To make complex quest, use big if/elseif instruction and global variable.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
KeeperMustDie
KeeperMustDie

Tavern Dweller
posted July 19, 2009 12:07 PM

Quote:
Hi,
I'm sorry if someone already asked this question, but I tried search and didn't find any. I want change the statistics of spells for heroes, but AFAIK units uses same spells as heroes. Is there any way, for example, to change mana cost and spell damage for hero and leave unchanged spell to unit? Thanks.

I have created Fireball_Stand.xdb and set trained cost to 30. Then changed SPELL_FIREBALL within Arch_Magi.xdb to SPELL_FIREBALL_STAND. In RefTables/UndividedSpells.xdb I added Item SPELL_FIREBALL_STAND and set it's path to Fireball_stand.xdb. But it's still do not work, I think I need to change types.xml, but if I set ID of SPELL_FIREBALL_STAND to 5 which is equal to SPELL_FIREBALL in game ArchMage will have simple fireball(10 mana cost), and if I set any other Id, then ArchMage will have not a fireball, but some other spell. Am I doing something wrong? Is there any walk around this?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Seiat
Seiat


Hired Hero
posted July 19, 2009 08:10 PM
Edited by Seiat at 22:33, 19 Jul 2009.

thx Warmonger, ur the best... i'm working on it right now

EDIT: It works!!! I owe you an enormous favor... as long as it doesn't involve getting on my knees haha jk, but i'm in ur debt.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Seiat
Seiat


Hired Hero
posted July 22, 2009 03:21 AM

How come I'm the only one asking questions? Here's one.. Is it possible to play an animation designed for combat on the adventure map? For example; I'm trying to get the animation for Meteor Shower to play above a small mountain, then have the mountain removed after some-odd game segments... Thus looking very much kool and like it was destroyed by meteors.

PlayObjectAnimation("blahdedah1", "BasicSkelAnim:Effects/Spells/MeteorShower.mb", ONESHOT_STILL);
sleep(20)
RemoveObject("blahdedah1");

of course there's more to the script but the animation is the only part that doesn't work. I Don't even know if it can work like this though.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Seiat
Seiat


Hired Hero
posted July 27, 2009 09:17 AM
Edited by Seiat at 09:29, 27 Jul 2009.

k I got an odd problem... trying to make a hero move to a different location on the map upon entering a region... code as follows

function hall1 (heroname)
if GetCurrentPlayer () == PLAYER_1 then
MoveHero("Grok", 208, 54, 1);
Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER, "hh1", nil);
end;
end;

Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER, "hh1", "hall1");

Why isn't this working? It works fine with MoveHeroRealTime but for some reason it doesn't like MoveHero?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Warmonger
Warmonger


Promising
Legendary Hero
fallen artist
posted July 27, 2009 09:41 AM

Quote:
This function orders the hero to move to the specified location. If the floor number is not
specified, the hero is supposed to go to the point with the specified coordinates on the floor he or
she already stands on. This function can only be invoked for heroes controlled by the AI players,
with their AI turned off. If the specified location is inaccessible, the function generates an error.

If the hero’s movement points are depleted en route, the movement will be continued in the next
turn.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Seiat
Seiat


Hired Hero
posted July 27, 2009 09:50 PM

So in other words there's no way to move the hero if a human controls it?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 126 pages long: 1 20 40 60 ... 66 67 68 69 70 ... 80 100 120 126 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.2371 seconds