StaticPhobia2 Posted October 28, 2020 Posted October 28, 2020 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"?
Invictusblade Posted October 28, 2020 Posted October 28, 2020 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
StaticPhobia2 Posted October 28, 2020 Author Posted October 28, 2020 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()
StaticPhobia2 Posted October 28, 2020 Author Posted October 28, 2020 YUS! I figured it out. Not sure why, but EditorID is broke af, so instead: Game.GetPlayer().EquipItem(Game.GetForm(0x00156D0B)) ; DaddyO as MDMA Debug.Notification("Is DaddyO even working") Case Closed. Don't even need to create a potion property.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.