I don't have the time right now to look at it, but first of make sure to load your map twice if you are editing already existing entity. This mean to host the map, leave the lobby, rehost it and then start your map. If you use your own shop, you will need to add it to the shops aura. Try also to have only one of each item, I don't think this would cause an error, but I guess you can try everything. You can only put one item in a shop if you want.
No worries I'll try what you said and get back to you.
Alrighty then - after loading the map twice, my item appeared in Accessories, but when I right clicked to buy it it said 'Cannot be bought from this location'.
Do I need to change a shop aura or something? :s
I've decided to take the hard route and create my own shop.entity, auras and items
One question, with the new shop I created (same model/data as legion well shop), can I place that on the map in the editor? Or do I have to do a script on entering the game to create the building?
One thing first: I don't know if its still doing it, but the editor used to removed the resources folder from your map so you would loose all your scripts. So its always a good idea to backup that resource folder before opening the editor.
Yes you can place your entity from the editor but its badly designed. Your custom entities will not load into the editor. So what you do is place a random entity where you would want your custom entities to be. Lets say you place a ward as a place holder for your custom entity.
Then when you're done, you save your map, close the editor and open up your map file with winrar.
There should be a entitylist file that you can open up with notepad. Open it and look a bit too see the syntax. You should see a type defined for every entity, so you can find the entity you used earlier to replace your custom one. In this case I said we use wards, so find the lines where the type is set to wards and replace the type="..." with your custom entities name.
When you're done, simply save the file and then it should be fine. It's a real pain to do, but at least it works.
Edit: I might say it now, you should try to avoid overwriting official entities since it forces you to load the map twice and will cause nasty issue with stringtables (tooltips) later on.
Awesome! Thanks man my shop's in game now
I've added you to the credits in my map :]
Now I just have to trial-and-error to get my items into the shop properly ><
Is there any particular reason why I can't get my items to have icons in the shop/inventory?
I've tried just the raw path, then I've added my own textures folder in the map and still nothing :s
You don't have to create a textures folder, you simply go into your resources folder and you the usually put the icons in the same folder as your entity.
So for your item you would put the icon in MyMap.s2z/resources/items/basic/itemname/icon.tga.
Then in your icon path of your entity you can simply put: path="icon.tga"
Ah okays :] thanks again hahaha!
One more thing before I stop posting for good hahaha
I'm trying to make an arena/game mode selector by having different units with auras in the small square of cliff I made.
My concept is [hero] enters the unit's aura and the state teleports the hero to the next area in the following order:
[Select Map Mode] -> [Select Arena] -> *the game should then spawn heroes for each player in the Shop area to purchase items [Done Shopping] -> *Teleports heroes to their respective team's starting points in the selected map.
Some arenas are only available for certain game modes - for example Capture the Flag has some Capture the Flag specific arenas, so I've decided the best of going about this would be to create different map selection zones.
So far I've got - Unit spawns in the Mode Selection area, gadget/teleporter spawns as well but moving into aura range does nothing. I based my teleporter off the Hellbourne Melee creep, then changed the <creep></creep> to <critter></critter>.
<?xml version="1.0" encoding="UTF-8"?>
targetoffset="0 0 54"
attackoffset="0 30 100"
<?xml version="1.0" encoding="UTF-8"?>
<aura state="State_Selector_Game_Mode_Team_Deathmatch" radius="100" targetscheme="allied_and_enemy_heroes" effecttype="" ignoreinvulnerable="true" />
</ability>Edit: for a reference - I've already gone through the entitylist and changed the names of the markers into the units :]PHP Code:
<?xml version="1.0" encoding="UTF-8"?>
<setent0 name="Selector_Map_Select_Deathmatch" />
<teleport source="target_entity" target="ent0" />
Last edited by Nytemair; 05-31-2011 at 04:45 AM.
Sorry I had a hard time getting on the forum for a while. There isn't anything wrong about asking for help, so don't feel "bad" for posting a lot. At worst, people will simply stop answering you. Anyway, I have some suggestion to try to fix your issue if it's still not working.
For a proximity "trigger" kind of thing, using an aura is usually what I do too, but rather than using the <onframe> in the state, I prefer to use the <onspawn>. I doubt this has anything to do with your issue.
Using a critter isn't something I would recommend since I have no idea how the targetscheme works on them. What I mean by that is using something like targetscheme="ally_units" or targetscheme="enemy_units" is kind of awkward since I don't know if a critter is considered an enemy or an ally, so if it doesn't fit in either of those, your aura will do nothing. You could try to create your own targetscheme that target any hero and that doesn't restrict it to enemy or/and ally. What I would do is simply create a gadget that is in the neutral team and that is invulnerable.
When you are stuck with things like that, the best thing to do is to trace your script into the console. You can do that by using actions like <printdebuginfo /> into your script, so that it will print in the console some information about what is going on. For example, you should try putting one inside your <onframe> event of your aura. So if you get into the aura range and you see the <printdebuginfo /> result into the console, now you know that the aura actually works, but that the script that it should trigger isn't. If you don't actually see it, then you at least know that your issue is before (wrong targetscheme, ability error, entity error, etc.)
As for the way to handle your arena selection, you don't actually need to create different selection zone, you can simply spawn your arena chooser depending on your game mode choice.
Lets say GameMode-1 has Arena-A and Arena-B, but GameMode-2 only has Arena-B.
What you can do is not spawn the Arena-A selector (we don't care about the Arena-B one since its in both) and only spawn it when the GameMode-1 is chosen.
So in your GameMode-1 aura script, you don't only teleport the unit, but you also spawn the Arena-A selector.
You can do it the other way around if you want (delete the selectors that the GameMode doesn't support.)
I've tweaked some things in the state.entity that the gadget applies and will test it out later, as well as the stuff you suggested.
One thing though, how do I check the console? Do you mean the game console with Ctrl+F8 or something else entirely? Never really looked into the debug parts of this yet.
Yes I meant the in-game console you get by pressing Ctrl+F8.
If your game crash or you want to do a quick search, there is a log of that console in a file:
XP: C:\Documents and Settings\%USERNAME%\My Documents\Heroes of Newerth\game\console.log
Vista\7: C:\Users\%USERNAME%\My Documents\Heroes of Newerth\game\console.log
You can open up that file with a regular text editor (you will probably be asked if you want to open such a large file, simply say yes).