Jump to content

How to add/equip ingredients? (scripting)


Recommended Posts

I'm having a bit of trouble understanding the syntax. Let's say I'm doing a get drugged while AAF animation mod. To force the player to take a mdma like drug, would it be like:

 

Ingredient Property DaddyO Auto Const

	PlayerRef.EquipItem(DaddyO,1)

Is this the proper syntax?

 

Editor ID , How many taken

 

and do I need "Const"?

Link to comment
5 minutes ago, StaticPhobia2 said:

I'm having a bit of trouble understanding the syntax. Let's say I'm doing a get drugged while AAF animation mod. To force the player to take a mdma like drug, would it be like:

 


Ingredient Property DaddyO Auto Const

	PlayerRef.EquipItem(DaddyO,1)

Is this the proper syntax?

 

Editor ID , How many taken

 

and do I need "Const"?

Personally, I would use Cast spell instead of Equipitem

Also Potion instead of Ingredient (Unless I completely missed something)

Keep the Const for the time being

SPELL Property Spell_Spell Auto


Function GiveMyselfStuff()
	Actor akActor = PlayerREF
	
	If (akActor)
		Spell_Spell.Cast(PlayerREF, akActor)
		Debug.MessageBox("I Can't Stop Taking this")
	EndIf
EndFunction

but if you want to remove a DaddyO when you have DaddyO's in your inventory then...

SPELL Property Spell_Spell Auto
Potion Property DaddyO Auto Const


Function GiveMyselfStuff()
	Actor akActor = PlayerREF
	if (Game.GetPlayer().GetItemCount(DaddyO) >= 1)
		If (akActor)
			akActor.removeitem(DaddyO,1,true) 
			Spell_Spell.Cast(PlayerREF, akActor)
			Debug.MessageBox("I Can't Stop Taking this")
		EndIf
	else
		Debug.MessageBox("I NEED IT")
	EndIf
EndFunction

it gives the illusion that you taken it but I am still fairly new to this

 

Link to comment
10 hours ago, Invictusblade said:

...

 

Much appreciated for the response! I figured it out, helps to read the creation kit wiki lol

 

But now the problem I have is DaddyO doesn't work, I think I might have a mod overwriting the editor id. But apparently we can use reference IDs instead? ?

 

 

Edit... and the wiki has that answer too. Wow, reading does wonders:

 

(Game.GetForm(0x00032DB7) As ObjectReference).GetBaseObject()

 
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use