[Help] Creating a Shotgun Breaching Round

Post » Wed Aug 26, 2009 3:42 am

Title

I currently have it loading and firing in game, I just need to find the correct script/effect. Currently, I am using a projectile with a small explosion, that applies and object effect that uses my base effect. Hope that made sense!

The Base Effect Uses this script

Begin ScriptEffectStart         unlockEND


Simplistic for now so I can test it out, I will add restrictions later. The issue is, this doesn't work. So, any ideas on how I could make custom ammo unlock a door on impact?
User avatar
SamanthaLove
 
Posts: 3565
Joined: Mon Dec 11, 2006 3:54 am

Post » Tue Aug 25, 2009 9:29 pm

I guess its a targeting issue. When you fire the gun, it does not have a target for unlocking. I have not really looked into weapons, but perhaps you need to make it like a missile? On impact, fire that script that unlocks everything in a certain radius.
User avatar
Amy Smith
 
Posts: 3339
Joined: Mon Feb 05, 2007 10:04 pm

Post » Tue Aug 25, 2009 8:43 pm

script that unlocks everything in a certain radius[/u].


That's what I need! What script is that?
I agree, I think it is a target issue
User avatar
Kelsey Anna Farley
 
Posts: 3433
Joined: Fri Jun 30, 2006 10:33 pm

Post » Tue Aug 25, 2009 8:42 pm

Would OnHit work for the begin command?
User avatar
Scared humanity
 
Posts: 3470
Joined: Tue Oct 16, 2007 3:41 am

Post » Wed Aug 26, 2009 1:05 am

Gaaaaaaah that is not what OnHit does. People have been making this mistake since Oblivion. OhHit runs when the thing it is on is hit.
User avatar
kristy dunn
 
Posts: 3410
Joined: Thu Mar 01, 2007 2:08 am

Post » Wed Aug 26, 2009 5:10 am

heh maybe they should have renamed it to OnBeingHit to make it clearer :P
User avatar
Yonah
 
Posts: 3462
Joined: Thu Aug 02, 2007 4:42 am

Post » Wed Aug 26, 2009 12:36 pm

Lol that is a little tricky naming. But, does anyone know the block/function I'm looking for?
I'm pretty sure NVSE would allow me to just get the reference, but to my knowledge I can't do that vanilla, and don't want to wait :). Plus, I love expanding my Geck knowledge, it actually helps me in my CS classes
User avatar
Gemma Flanagan
 
Posts: 3432
Joined: Sun Aug 13, 2006 6:34 pm

Post » Wed Aug 26, 2009 2:02 am

There isn't a function. ObjectUnderReticule or GetCombatTarget might find what the player's looking at, and you could track when the player's count of breaching rounds drops to know when he's fired one?
User avatar
gary lee
 
Posts: 3436
Joined: Tue Jul 03, 2007 7:49 pm

Post » Wed Aug 26, 2009 10:27 am

Well, GetCombatTarget is for actors, and ObjectUnderReticule returns the ObjectID right?
I either need something that will return the door's ref id, or something that will flat out unlock anything.
User avatar
Stat Wrecker
 
Posts: 3511
Joined: Mon Sep 24, 2007 6:14 am

Post » Tue Aug 25, 2009 11:49 pm

Gaaaaaaah that is not what OnHit does. People have been making this mistake since Oblivion. OhHit runs when the thing it is on is hit.

At least one modder bangs his head on the desk every time it happens. :P
User avatar
Leonie Connor
 
Posts: 3434
Joined: Mon Mar 12, 2007 4:18 pm

Post » Wed Aug 26, 2009 7:07 am

Now, there IS a spot for an impact script. Maybe that helps somehow other than avoiding the whole explosion part
User avatar
Megan Stabler
 
Posts: 3420
Joined: Mon Sep 18, 2006 2:03 pm

Post » Wed Aug 26, 2009 11:01 am

Can you log the reference to a particular lock when a player activates it? If so, make the player try a lock first before shooting it and use the last logged lock reference as the one that is opened.
User avatar
Mari martnez Martinez
 
Posts: 3500
Joined: Sat Aug 11, 2007 9:39 am

Post » Tue Aug 25, 2009 10:28 pm

That I could do, and probably will end up doing for the time before NVSE arrives, but I'm hoping for a cleaner, load ammo, shoot, unlock functionality.
Great suggestion though!
User avatar
Rhi Edwards
 
Posts: 3453
Joined: Fri Jul 28, 2006 1:42 am

Post » Tue Aug 25, 2009 10:07 pm

What I don't understand is, why is a plain old unlock script not running on impact?
User avatar
Gavin boyce
 
Posts: 3436
Joined: Sat Jul 28, 2007 11:19 pm

Post » Tue Aug 25, 2009 8:58 pm

Probably because a door/lock is not a valid target for a weapon. Those scripts probably only run on NPCs, creatures and possibly some types of activators.

No point in running an impact script on any bullets that miss their target and hit a wall.....waste of resources as far as the developers are concerned.
User avatar
Katie Samuel
 
Posts: 3384
Joined: Tue Oct 10, 2006 5:20 am

Post » Wed Aug 26, 2009 6:58 am

So, effects aren't designed for use against static objects?

And does the same impact rule apply to an effect applied through an explosion?
User avatar
Nathan Maughan
 
Posts: 3405
Joined: Sun Jun 10, 2007 11:24 pm

Post » Tue Aug 25, 2009 10:27 pm

I feel like this was done in oblivion via the use of first activating the lock with a weapon drawn. This then applied a shader effect letting the player know they had indeed targeting the correct lock (door chest etc had a reddish tint). Any attack made by the player made the script calculate out a score which was weighted with both strength, luck and a random number. This was then compared to the lock level. A critical fail resulted in a possibility of the contents being destroyed, normal fail did nothing, or success. Such a method of approaching the problem isn't the most clean but it worked very well.

Edit: I believe the way they detected if the lock was the thing being attacked was by spawning a dummy actor on the lock which had an onhit block. I'll try to do some research this week after midterms go away.
User avatar
Melanie
 
Posts: 3448
Joined: Tue Dec 26, 2006 4:54 pm

Post » Wed Aug 26, 2009 12:04 am

Okay, I have an idea, just don't know how to implement it.
So, when the player fires a breaching round (he'd have to be in close proximity to the lock) an invisible object is dropped with a script attached. This script will unlock anything within a small radius, and only runs once. Now, how can I unlock anything in a certain radius?
User avatar
Jaki Birch
 
Posts: 3379
Joined: Fri Jan 26, 2007 3:16 am

Post » Tue Aug 25, 2009 10:46 pm

Okay, I have an idea, just don't know how to implement it.
So, when the player fires a breaching round (he'd have to be in close proximity to the lock) an invisible object is dropped with a script attached. This script will unlock anything within a small radius, and only runs once. Now, how can I unlock anything in a certain radius?

The only way I can think of doing that is adding a script to the objects themselves which is called whenever the pc is within a set distance and attacks. Adding such a script to such an ubiquitous object as a door or safe however results in a lot lot lot of incompatibility (which is why although this is what was originally done for oblivion lock bashing it was later replaced by dummy actors or an OBSE method).
User avatar
Laura Elizabeth
 
Posts: 3454
Joined: Wed Oct 11, 2006 7:34 pm

Post » Wed Aug 26, 2009 6:34 am

Yeah, I think its better I just wait for NVSE
User avatar
luis ortiz
 
Posts: 3355
Joined: Sun Oct 07, 2007 8:21 pm

Post » Wed Aug 26, 2009 10:25 am

Hmmm...

Fake explosion on impact. Projectile links to an Explosion, Explosion places a Placed Impact Object with a Begin OnTriggerEnter script block. That's how you can apply the scripts.

From there, I'm not sure... is there a way to check to see if the object is a door? Might want to have a distance check on the Player so they have to be really up close to the door to breach.

The method above is how the Tesla explosion in FO3 Broken Steel detects targets to arc to, or whether or not the thing it hit is a Vertibird and should blow it up.

Also, this should be put into the GECK help forum.
User avatar
Daniel Holgate
 
Posts: 3538
Joined: Tue May 29, 2007 1:02 am

Post » Wed Aug 26, 2009 5:39 am

Hmmm...

Fake explosion on impact. Projectile links to an Explosion, Explosion places a Placed Impact Object with a Begin OnTriggerEnter script block. That's how you can apply the scripts.

From there, I'm not sure... is there a way to check to see if the object is a door? Might want to have a distance check on the Player so they have to be really up close to the door to breach.

The method above is how the Tesla explosion in FO3 Broken Steel detects targets to arc to, or whether or not the thing it hit is a Vertibird and should blow it up.

Also, this should be put into the GECK help forum.

You can use a GetLocked. If it's anything besides a safe or door that is locked it will return a 0. Seems like it ought to work pretty well..
Edit: So custom ammo types can have explosions attached to them? That makes them very useful as script activators.
User avatar
Jack Bryan
 
Posts: 3449
Joined: Wed May 16, 2007 2:31 am

Post » Wed Aug 26, 2009 12:34 pm

You can use a GetLocked. If it's anything besides a safe or door that is locked it will return a 0. Seems like it ought to work pretty well..
Edit: So custom ammo types can have explosions attached to them? That makes them very useful as script activators.


Custom ammo types can have alternative projectiles, which in turn can have explosions attached to them, which in turn can drop anything as a "placed impact object".

EDIT: An even better candidate than GetLocked, http://geck.gamesas.com/index.php/GetLockLevel. Presumably still in the FONV vanilla script function palette.
User avatar
Sara Lee
 
Posts: 3448
Joined: Mon Sep 25, 2006 1:40 pm

Post » Wed Aug 26, 2009 9:49 am

Dunno if it's any help but some mods in Oblivion (I think OOO) use something similar... grah, forget the name, but basically it let you whack locked objects into unlocking them. A breaching shotgun round would be pretty cool, however I think if you're going to make it usable on containers (instead of just doors) there should be a chance you accidently destroy everything in said container when you blast a round into it.
User avatar
kristy dunn
 
Posts: 3410
Joined: Thu Mar 01, 2007 2:08 am

Post » Wed Aug 26, 2009 1:02 am

Well obviously get lock level would be used to calculate the chance of the door actually opening, but I was just saying in order to see if the script even runs at all, simply checking if the object is locked will inform you whether its a valid target.
User avatar
Mr. Allen
 
Posts: 3327
Joined: Fri Oct 05, 2007 8:36 am

Next

Return to Fallout: New Vegas