Jump to content

[LE] Experienced modder TIP required, Script or other creation way.


Recommended Posts

My issue is that i have an item (skull key) that is floating in mid air, hold there only by black magic, OUUuuuuu spooky......, and i want it to not be affected by "telekinesis spell" or "fireball" or "exploding arrows" etc..., the player must figure out my puzzle - way to obtain it. Basically i want it to stay unaffected by everything except by the player picking it up after solving the puzzle.


The only way that i came up in doing such a thing is to :

1) Create a static skull key

2) Create a trigger box around it

3) Create a script that upon activating the trigger box will "disable-delete" the static skull key and add to the player's inventory the actual skull key and "self disable" the trigger box or add a "DoOnce" property (to avoid adding a second skull key upon re-activating accidentally the trigger box).


My question :


Is there an other way to do this ? with a script attached to the actual key, if so, what's the logic behind the creation of such script ?.

I been trying to the last couple of days... but came up with nothing...


* The key (non ststic) already has a "disable havoc on load" script.


Thanks in advance for spending your time to look at this, whoever you are !

Edited by maxarturo
Link to comment
Share on other sites

I'm not exactly an experienced modder, but (or may be because of that) I try to avoid scripts wherever possible. That's mainly because I am very weak on scripting, so others may give different advice. That being said, I wonder if you could put an invisible static item under a normal key, so the player can pull it off normally. I'm not sure if that would create a passage problem, but if it takes telekinesis, I'm guessing it's up high enough not to be a roadblock?

Link to comment
Share on other sites

I'm not exactly an experienced modder, but (or may be because of that) I try to avoid scripts wherever possible. That's mainly because I am very weak on scripting, so others may give different advice. That being said, I wonder if you could put an invisible static item under a normal key, so the player can pull it off normally. I'm not sure if that would create a passage problem, but if it takes telekinesis, I'm guessing it's up high enough not to be a roadblock?

Your logic is the same as creating collision layers around it, by doing this the player can still cast telekinesis and pull it from top or in your case - suggestion from side.
Fear not scripting if done correctly !
Thanks for replying & thinking about this.
Edited by maxarturo
Link to comment
Share on other sites

Lel and hi Maxarturo xD

 

1) Make Activator

2) Add Script that delete self Activator and Give player item

3) done :D lol

 

also i want to see you script :) and maybe upload my but i don't need script like this for now xD

 

 

 

And btw. im Tobi :) hy hy hy xD

Scriptname QLG_Script_Tests extends ObjectReference  

	Key property QItem auto
	{ Item to Give }

Event OnActivate( ObjectReference QVar )

	if QVar == Game.GetPlayer()
		
		Game.GetPlayer().AddItem( QItem , 1, false )

		Utility.Wait(0.6)
		self.disable()
		Utility.Wait(0.9)
		self.delete()
		
	EndIf

EndEvent

This Compile fine but no tested in game :P

lel xD

 

 

 

can i see any img. or video from you mod pls ? ;3... hy hy xD

Link to comment
Share on other sites

The way you have done it with the static is probably the best route. I do not think it is possible to prevent a non-static item from being manipulated with the telekinesis spell.

I haven't build it jet, that's why i'm researching it.
I was afraid that this would be the case...
Thanks for replying !.
Edited by maxarturo
Link to comment
Share on other sites

Lel and hi Maxarturo xD

 

1) Make Activator

2) Add Script that delete self Activator and Give player item

3) done :D lol

 

also i want to see you script :smile: and maybe upload my but i don't need script like this for now xD

 

 

 

And btw. im Tobi :smile: hy hy hy xD

Scriptname QLG_Script_Tests extends ObjectReference  

	Key property QItem auto
	{ Item to Give }

Event OnActivate( ObjectReference QVar )

	if QVar == Game.GetPlayer()
		
		Game.GetPlayer().AddItem( QItem , 1, false )

		Utility.Wait(0.6)
		self.disable()
		Utility.Wait(0.9)
		self.delete()
		
	EndIf

EndEvent

This Compile fine but no tested in game :tongue:

lel xD

 

 

 

can i see any img. or video from you mod pls ? ;3... hy hy xD

Hi Tobi.
I haven't created the script jet, but i know exactly what needs to be done, i'll post the script in the next two days, right now i'm still building the puzzle and cell for it.
I have some teasers images in the posts section of "ACT I" of my mod. (See Sneak peek).
Link to comment
Share on other sites

As promised to TobiaszPL.

This is the my Script and works as intended.





Scriptname aXMDparaplanisiSkullKeySCRIPT01 extends ObjectReference
{Set stage on Quest - Adds Skull Key to inventory - Disables STATIC Key - Self disable Trigger Box Activator}


Quest Property myQuest auto
{The quest we will be setting stages on}

Int Property stageSetOnTriggered auto
{The stage that will be set when the player Triggered this}

MiscObject Property Key01 Auto
{assign key or item to add to inventory}

ObjectReference Property StaticKey Auto
{object - item to disable}

ObjectReference Property SoundFX Auto
{soundFX to enable}

bool Property isTriggered = false auto hidden


Event OnActivate(ObjectReference akActionRef)
if (myQuest.GetStageDone(stageSetOnTriggered) == FALSE)
myQuest.SetStage(stageSetOnTriggered)
akactionref.additem(Key01, 1)
isTriggered = true
StaticKey.disable()
SoundFX.enable()
self.Disable()
Utility.wait(2.5)
debug.messagebox("You proved yourself worthy but cursed")
akactionref.DamageActorValue("Health", 100.0)
Game.TriggerScreenBlood(6)
endif
EndEvent





If someone more experienced scripter can take a look at it and maybe rewrite it in a more elegant way...

I'll be most grateful !

Edited by maxarturo
Link to comment
Share on other sites

Thats how my script would look :P

 

 

 

Scriptname aXMDparaplanisiSkullKeySCRIPT01 extends ObjectReference  
{ Script:
	1: Set Quest Stage
	2: Give Skull Key to Ref.
	3: Disable self
	4: Disable TriggerBox }
;===- Base Info. -===;
 ;Created: 2019-03-021
 ;Author: Maxarturo
 ;Unit: < Where is Original script file? >
;===- Var. setup -============================================
 
 
	Quest Property myQuest auto
	{ The Quest we will be setting stage On }
	
	Int Property stageSetOnTriggered auto
	{ The Stage to set }
	
	MiscObject Property MyKey Auto
	{ Key for action Ref. to give }
	
	ObjectReference Property StaticKey Auto
	{ Object Ref. to be Disabled }
	
	ObjectReference Property SoundFX Auto
	{ Sound to Play on Activate }
	
	bool Property isTriggered = false auto hidden



;===- Main Script -==================================================
Event OnActivate( ObjectReference ActionRef )
	If ( myQuest.GetStageDone( stageSetOnTriggered ) == FALSE )
		
		myQuest.SetStage( StageSetOnTriggered )
		
		ActionRef.additem( MyKey, 1 )
		isTriggered = true
		
		StaticKey.Disable()
		Self.Disable()
		SoundFX.Enable()
		
		Utility.Wait( 2.5 )
		ActionRef.DamageActorValue( "Health", 100.0 )
		Game.TriggerScreenBlood(6)
		
		debug.messagebox("You proved Yourself worthy but Cursed")
	EndIf
EndEvent

; Object Reference for sounds ? O_O
	Sound property MySound auto
; Actor Function cast on ObjectReference ? :o 

 

 

 

Btw. You use N++ ? ( Notepad++ )

cause i have Style for Papyrus :x

 

Style color text for you so its much more easy to read :D

 

if you dont have any i can post one here once ill be in my Home in Forest :x

 

y i know my english is potato but i have 2 homes and sometimes i work in CK in work xD

so i have many places here i have my code :x

 

im not living in tent in forest xD lol

Link to comment
Share on other sites

Yes i do use Notepad++ and i'm quite settled with the text coloring, makes me see & distinguish the text as i want on a fast pass. Plus i got used to it.

Nevertheless, thank you !

Link to comment
Share on other sites

  • Recently Browsing   0 members

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