|
|
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
|
|
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... ^^
|
|
frostymuaddib
Promising
Supreme Hero
育碧是白痴
|
posted February 25, 2015 10:09 PM |
|
|
I'd like to play the map
|
|
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.
|
|
frostymuaddib
Promising
Supreme Hero
育碧是白痴
|
posted February 26, 2015 07:08 PM |
|
|
|
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?
|
|
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);
|
|
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
|
|
frostymuaddib
Promising
Supreme Hero
育碧是白痴
|
posted February 26, 2015 07:59 PM |
|
|
No worries It happens
|
|
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
|
|
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
|
|
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
|
|
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).
|
|
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
|
|
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?
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
Sligneris
Supreme Hero
|
posted March 02, 2015 12:23 AM |
|
|
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.
|
|
|