Jump to content

Scripting a Terminal Hacking Gun?


user826

Recommended Posts

I'm trying to make a gun that unlocks terminals when they are shot, but my script doesn't seem to be working. Could someone more familiar with GECK scripting please give me some pointers? Currently, I've got an effect script set up as follows:

scn ICEBreakerEffect

ref victim

begin ScriptEffectStart
    set victim to GetSelf
    victim.Unlock
end

I've then linked this script to a base effect (Self, Touch, Target, No Magnitude) and made an object effect with the conditions (GetIsObjectType Terminal == 1) and (GetLocked == 1). However, when I apply the object effect to a gun, it doesn't work! Where am I going wrong? Thanks for your time!

Edited by user826
Link to comment
Share on other sites

It's hard to say, but I've used an invisible explosion tied to a projectile to place an object that has a script on it that moves a marker to the placed object, then deletes the placed object before to work around getcrosshairref before.

 

Perhaps if you had the placed object move a trigger box to it instead, and have the trigger box check the target ref and unlock it, it might be work, but I'm sure it'd be easier to use the FOSE function than to make sense of what I just typed.

 

Besides, have you ever heard of anything that's not compatible with FOSE? I haven't.

Edited by uhmattbravo
Link to comment
Share on other sites

It's hard to say, but I've used an invisible explosion tied to a projectile to place an object that has a script on it that moves a marker to the placed object, then deletes the placed object before to work around getcrosshairref before.

 

Perhaps if you had the placed object move a trigger box to it instead, and have the trigger box check the target ref and unlock it, it might be work, but I'm sure it'd be easier to use the FOSE function than to make sense of what I just typed.

 

Besides, have you ever heard of anything that's not compatible with FOSE? I haven't.

 

Hmm, that sounds super complicated, haha! I may have to rethink this.

 

As far as the compatibility concerns, I was thinking more about if I share my mods with my friends who aren't hardcore modders and either don't know how or can't be bothered to install FOSE. I always like to stick to vanilla game assets and scripting (I even try to avoid using official DLC content) so that even if all they have is the original game, the mod still works.

Link to comment
Share on other sites

 

As far as the compatibility concerns, I was thinking more about if I share my mods with my friends who aren't hardcore modders and either don't know how or can't be bothered to install FOSE. I always like to stick to vanilla game assets and scripting (I even try to avoid using official DLC content) so that even if all they have is the original game, the mod still works.

 

I agree with your sentiment here ... now all I need is a bunch of friends who like to play fallout.

 

Cheeze and rice ... where do you run into enough other fallout friends to share mods with on your personal contacts.

Maybe you could invite me :geek:

 

But anyways to contribute something to the thread ...

 

The main reason this doesn't work , is because of the begin block ... ScriptEffectStart ... only works on NPC's , Doors & Containers.

 

And if you're dead set on vanilla ... adding destruction stage info to all the terminals would work for this script block to trigger

http://geck.bethsoft.com/index.php?title=OnDestructionStageChange

 

Or you could just simply use a perk with Entry Point "Activate" and then script them fireing your gun if equipped.

 

What uhmattbravo is mentioning I think can work ... bit fuzzy on those details myself.

But basically sounds like ... You shoot a bullet which explodes upon impact. Then that explosion places a marker/object ... which then checks for any Terminal References within a proximity , and unlocks them. ???

Link to comment
Share on other sites

ÃÂ

What uhmattbravo is mentioning I think can work ... bit fuzzy on those details myself. ÃÂ

But basically sounds like ... You shoot a bullet which explodes upon impact. ÃÂ Then that explosion places a marker/object ... which then checks for any Terminal References within a proximity , and unlocks them. ÃÂ ???

Pretty much, but i was thinking the object it places moves a persistent ref to itself that does the rest of the work. I don't know how well a trigger box can be placed as a base object, since it's placed refs can be resized so i was thinking a persistent trigger box ref, pre-sized, that gets stored in an inaccessible cell when not in use.

 

But I can guarantee the method can move a specific reference to where the projectile hits. It's how my New Vegas UFO's radio works. My FO3 vertibird works similarly, but until I finish the other new features, it doesn't actually move a marker, just copies the placer object's location data.

 

The part that I'm unsure about is whether or not a trigger box will actually detect a terminal.

Edited by uhmattbravo
Link to comment
Share on other sites

I don't know why your worried about a trigger box , the projectile then explosion would have already been there ... so to late to detect.

 

I'm guessing with a "Begin onScriptEffectStart" block for the Explosion effect script.

To then use "PlaceAtMe" calling to the explosion ... to place a scriptable object at it ... With an onLoadBlock , or even gamemode if that doesn't work ,,, Who's script will Get the Reference of the nearest Terminal Ref ... Then unlock it.

 

2 different scripts if that wasn't clear.

Edited by Mktavish
Link to comment
Share on other sites

It's to bypass the scripteffectstart block and replace it with an ontrigger block.

 

The explosion itself, with no scripting, places an invisible scripted object. (There's a dropdown box on the explosion's menu for it to place an object just like the projectile menu has a dropdown to attach the explosion.)

 

The object's script has a gamemode block that moves the pre made trigger box from it's holding cell to the object then disables and deletes the object:

 

Ref placerRef

 

Begin gamemode

 

Set placerRef to getself

TriggerboxRef.moveto placerRef

Disable

Markfordelete

 

End

 

The trigger box has a script to unlock the target then move the trigger box back to a marker in the holding cell, sort of like this:

 

Ref targetref

 

Begin OnTrigger

 

Set targetref to getself

 

If targetref.getisobjecttype terminal == 1

Targetref.unlock

Moveto markerInHoldingCellRef

Endif

 

End

 

 

 

 

But... I don't know for sure the trigger box will detect terminal forms.

Edited by uhmattbravo
Link to comment
Share on other sites

You said "There's a dropdown box on the explosion's menu for it to place an object just like the projectile menu has a dropdown to attach the explosion."

 

Holy FnnShism ... you are right ... I have totally missed that option to date.

WOW!!! that is to f*#@in cool ... it opens up new possibilities for me :)

 

I'm gona have to defer to your wisdom at this juncture ... And just inject conversation when the OP comes back.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...