Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Throw an exploding object?
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#21
RE: Throw an exploding object?

Where are are the entities located? Are they in the entities folder?
(This post was last modified: 03-19-2012, 01:44 AM by Apjjm.)
03-19-2012, 01:43 AM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#22
RE: Throw an exploding object?

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?

(This post was last modified: 03-19-2012, 02:02 AM by Damascus.)
03-19-2012, 01:59 AM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#23
RE: Throw an exploding object?

(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.
(This post was last modified: 03-19-2012, 02:10 AM by Apjjm.)
03-19-2012, 02:07 AM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#24
RE: Throw an exploding object?

Alright, I put the following in my OnStart section:
explosions_AddExplosiveItem("fulm_gold","grenade1_explosion.ent",2,10000,110);
explosions_InitExplosiveItemMesh("fulm_gold");

It doesn't destroy the door, but I'm just going to use the script to do it, I think! (And make up some excuse for when it explodes just by touching the script area, like the chemical reacts strongly with metal) Either way, I'm very happy this is all working, thanks for being so patient and helping me out!

03-19-2012, 02:15 AM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#25
RE: Throw an exploding object?

No problem - good luck with the rest of your story Smile.
03-19-2012, 02:18 AM
Find




Users browsing this thread: 3 Guest(s)