(03-19-2012, 01:59 AM)Damascus Wrote: Yes, it is. Somehow, I got it to work, and I think I know what the problem was, even though it doesn't make sense to me.
I keep each map stored in a different custom_story folder because i can't use dev mode. I have to load the custom story every time I want to test it.
I put your entities in the folder for the very first map ("Festung," since I was going to end up putting the maps here in the end) and the map I was testing was in a different custom story folder ("Dungeon"). When I moved your entities over to the Dungeon custom story folder and retargeted them, they worked in game.
This doesn't make a lot of sense to me. I targeted it in the Festung folder, even though it was a different location than the maps I was testing. Why shouldn't it work?
Also i see the part of the code you're talking about is in the OnStart portion of the code, which you said couldn't be copied and pasted. What would I have to do instead?
You will want the following:
//For each grenade...
explosions_AddExplosiveItem("[NAME_OF_GRENADE_ENTITY]","grenade1_explosion.ent",2,[FORCE],[DAMAGE]);
explosions_InitExplosiveItemMesh("[NAME_OF_GRENADE_ENTITY]");
//Where
[NAME_OF_GRENADE_ENTITY] = The name of the entity in the level editor (e.g grenade1_1)
[FORCE] = The force applied (I used 10000 (10k)) at the centre of the explosion
[DAMAGE] = The damage dealt at the centre of the explosion (110 should do quite well for the door)
As for why it wasn't working with the replacements in your setup I don't know (Though i find it good to have the entities in a folder called something like "Custom" in the entities folder when you are developing your map - then you can just copy the whole custom folder across into the custom story later when you want to release), but its good you got it working eventually.