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 80 100 ... 108 109 110 111 112 ... 120 126 · «PREV / NEXT»
frostymuaddib
frostymuaddib


Promising
Supreme Hero
育碧是白痴
posted February 25, 2015 09:12 PM

There is an undocumented script function GetObjectNamesByType(arg1) that can be used for this I think. (BTW, there is a thread with undocumented functions, it may be of interest to you: thread)

This function returns array of object names for objects of specific type that is named by arg1.

I think you can get an array with all monster names, and then get its length like this:

length(GetObjectNamesByType("CREATURE"))

This should give you what you need

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


Famous Hero
posted February 25, 2015 09:31 PM
Edited by lotihoti at 21:43, 25 Feb 2015.

Need to check that

I hate when my editor crashes and crashes again...

My map (currently)

[/url]

May i share it once its finished... ^^

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


Promising
Supreme Hero
育碧是白痴
posted February 25, 2015 10:09 PM

I'd like to play the map

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


Famous Hero
posted February 26, 2015 07:02 PM

Meeee agööön:

Is there a way to create regions with different forms?
So far i can only create regions which have a square or rectangle form.

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


Promising
Supreme Hero
育碧是白痴
posted February 26, 2015 07:08 PM

I think you can't.

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


Famous Hero
posted February 26, 2015 07:38 PM

Ok thx

another problem:
I block a region (which works). How do i unblock it?
I use SetRegionBlocked("Regionname", false, -1);

If i open console - the following happens:

"Value was NIL when getting global with name "false""
What does that mean? How do i unblock it again?

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


Promising
Supreme Hero
育碧是白痴
posted February 26, 2015 07:45 PM

I'm not certain of this, but I think false is actually defined as nil.

So, you can try this:

SetRegionBlocked("Regionname", nil, -1);

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


Famous Hero
posted February 26, 2015 07:48 PM

Tried it right right after my post

But the region stays unblocked.

Edit: unblocked the false one -.- god im so stupid

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


Promising
Supreme Hero
育碧是白痴
posted February 26, 2015 07:59 PM

No worries It happens

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


Famous Hero
posted February 26, 2015 08:47 PM
Edited by lotihoti at 20:54, 26 Feb 2015.

Short last post for today xD

Got some nice other things now on my map. But im stuck again.
I want to teleport the hero which enters the specific region to teleport to some coordinates.
My problem is: How do i get the name of the object, which enters the region?

My function currently is:

function Telport1()
SetObjectPosition("missing",84,88);
end;

Please help me again (patiens xD with noobies is always hard).

I ll upload my map when its finished... i need to translate it then - cause im Italian and so noone rly understands my map xD

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


Promising
Supreme Hero
育碧是白痴
posted February 26, 2015 09:04 PM

I'm glad I'm of help to you

You can use the Trigger function for this.

First, create a function that teleports your hero, that will be a handler for Trigger function. Note that it has an argument heroName, function Trigger passes that argument automatically when it calls your Teleport1 function:

function Telport1(heroName)
SetObjectPosition(heroName,84,88);
end;

Now, this is how Trigger function will look:

Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER, "YourRegionName", Teleport1);

It would be the same if you use REGION_ENTER_AND_STOP_TRIGGER event instead of this: REGION_ENTER_WITHOUT_STOP_TRIGGER.

I hope that this helps

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


Famous Hero
posted February 26, 2015 09:27 PM
Edited by lotihoti at 21:31, 26 Feb 2015.

Hmmm let me check that:

First i created 2 Triggers:

Trigger(REGION_ENTER_AND_STOP_TRIGGER,"Teleporter1","Telport1");
Trigger(REGION_ENTER_AND_STOP_TRIGGER,"Teleporter2","Telport2");

After that i created 2 functions:

function Telport1("heroname")
SetObjectPosition("heroname",84,88,-1);
end;

and:

function Telport2("heroname")
SetObjectPosition("heroname",133,90,-1);
end;

I get this ingame:
ERROR: `...' expected;
lasttoken read: "heroname" at line 62 in string "DoString script"
Script failed: unknown error


Edit: I removed the "" on heroname and its working

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


Promising
Supreme Hero
育碧是白痴
posted February 26, 2015 10:33 PM

Yeah. When you use ", that means that value in between them is a string. When you leave them out, you have an argument of the function (a variable).

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


Honorable
Legendary Hero
Once upon a time
posted February 27, 2015 12:59 PM
Edited by markkur at 15:58, 27 Feb 2015.

Success! After some problems with the Editor. Here's what happened, this is for other rookies that may be following along;

*When I copied the script into the Map I hosed-up the 2nd and 3rd days by using Day instead of day for the text files for the 2nd and 3rd days, instead of making sure the "letter-case" in the script and text files matched
*Worse yet, once I saw my error...I could not edit that script w/o the Editor crashing. TG I had the previous experience of "keeping a virgin copy before starting" (I anticipated the possibility of corruption problems and it happened) --- So I made my corrections to the text files, repasted the script and things are sweet now.

My thanks again Frosty

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


Famous Hero
posted February 28, 2015 11:01 AM
Edited by lotihoti at 11:33, 28 Feb 2015.

Hey there,

Is it possible to increase the size of an existing map?

Because my map has a size of 216*216... But for my additional content i need more space... May i can increase her to 320x320?

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


Honorable
Legendary Hero
Once upon a time
posted February 28, 2015 12:28 PM

Probably not what you want to hear; here's my earlier response to a similar question.

I've copied objects-only from inside a map description and created a larger new map but that copies XY locations. So to even bother with that you would need the reason that I did "of wanting to have more land around a layout." But even then, by default the additional land goes to the original XY, so the new land on a larger map is added to the North and East only as all objects are placed as in their original XYs.

and add;

This is objects only...you have to recreate the land and dig out the objects out of the underground.

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


Famous Hero
posted February 28, 2015 12:47 PM

Adding on north and east will be fine...

I dont want to recreate the map... that would be so much work

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


Honorable
Legendary Hero
Once upon a time
posted February 28, 2015 12:58 PM

lotihoti said:
Adding on north and east will be fine...

I dont want to recreate the map... that would be so much work


Yeah, you don't. <L> I did it ONCE. Never again. You have to have both maps at hand and duplicating like this is tedious at best. And I can think of stronger words to describe that fun.

Although I'm doing something now, nearly as crazy.

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


Famous Hero
posted February 28, 2015 01:19 PM
Edited by lotihoti at 14:24, 28 Feb 2015.

So let me get it:

1. Create a map which is 320 x 320.
2. Save
3. You copy all things in Editor/H5MMods/mapname/
4. You copy all things to the other map which is 320x320.

But doesnt the other map overwrite the other?

Edit:
I know now, what files have to be copied - and how...
And what work has to be done again... Intresting - ill share it when im finished.

Its even possible to create maps with different size of underground...

The size of the map is located in: groundTerrain and UndergroundTerrain.

If u copy just this file from another map - the size changes. So to increase the size, you have to do the texture and land modelling part again... All Objects are in if you copy the other files

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


Supreme Hero
posted March 02, 2015 12:23 AM
Edited by Sligneris at 00:19, 09 Mar 2015.

How do I change objects and animations used in a cutscene? I want to make some fixes in a few game cutscenes I don't know where to start.

 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 80 100 ... 108 109 110 111 112 ... 120 126 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.2508 seconds