~Basic Scripting and Editor Help(Easy Scripting Updated!)
-
- Posts: 28
- Joined: Tue Oct 21, 2014 5:51 am
Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!
Hi guys,
Sorry in advance, but I'm totally "level1" guy with this stuff.
I want to make floor_trigger that puts text on the screen. e.g. you walk into a room and text pops up saying "The room reeks of death." or something like that.
Do i put a trigger down and link it to a script_entity? What do I put in the script box for this simple action?
If you guys can set me on the right path here, I'll be able to extrapolate and come up with some other stuff myself.
Thanks
Sorry in advance, but I'm totally "level1" guy with this stuff.
I want to make floor_trigger that puts text on the screen. e.g. you walk into a room and text pops up saying "The room reeks of death." or something like that.
Do i put a trigger down and link it to a script_entity? What do I put in the script box for this simple action?
If you guys can set me on the right path here, I'll be able to extrapolate and come up with some other stuff myself.
Thanks
Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!
Code: Select all
function reekText()
hudPrint("The room reeks of death.")
end
-
- Posts: 28
- Joined: Tue Oct 21, 2014 5:51 am
Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!
If I put that
function reekText()
hudPrint("The room reeks of death.")
end
into the script_entity, then link the trigger to the script_entity and select --on activate, target floor_trigger, reekText()-- the text appears on the screen when the player spawns. Trigger does nothing. Am I missing something?
function reekText()
hudPrint("The room reeks of death.")
end
into the script_entity, then link the trigger to the script_entity and select --on activate, target floor_trigger, reekText()-- the text appears on the screen when the player spawns. Trigger does nothing. Am I missing something?
- SnowyOwl47
- Posts: 148
- Joined: Fri Sep 12, 2014 10:41 pm
Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!
I'm so glad party hooks still workIsaac wrote:I don't understand why they ever would...sapientCrow wrote:ok thanks.
I do not understand why they do not allow for the ability to override some of the core rules and formulas more easily.
I do not even see a way to alter attributes or add abilities to items in the editor itself.
(They include the mod tools for people to mod what they like in their own maps; but I can't imagine allowing that in their official campaign. They likely balanced the game based on the predicted limits of the PCs.)
**If there is a Party hook for XP gains, then such a hack could probably work in a modded map; but I don't think (certainly don't know) if you can hook to that via console script in the running game; as would have to be done to patch the LoG2 campaign.
*** If there isn't such a hook, it's not a bad thing to ask for in a future patch or one of Petri's glögg sessions.
Once the scripting reference is made public, you could choose to add extra points at times when they level up... If you wanted a 20% xp bonus... just add 20% of their current XP after they level up; or (if possible) add the points directly after they level up, but before you've spent them.
-
- Posts: 28
- Joined: Tue Oct 21, 2014 5:51 am
Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!
Nevermind, it worked! Thanks!
I placed the trigger under an object haha
I placed the trigger under an object haha
- SnowyOwl47
- Posts: 148
- Joined: Fri Sep 12, 2014 10:41 pm
Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!
Make sure nothing like an item or anything is touching the floor_triggure or pressure plate or whatever your using. Once it gets activated by anything you allow it to be activated by its activated.[SMUG]Ipecac wrote:If I put that
function reekText()
hudPrint("The room reeks of death.")
end
into the script_entity, then link the trigger to the script_entity and select --on activate, target floor_trigger, reekText()-- the text appears on the screen when the player spawns. Trigger does nothing. Am I missing something?
Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!
Is there a way to add onDie trigger to a creature you spawn with a script?
- SnowyOwl47
- Posts: 148
- Joined: Fri Sep 12, 2014 10:41 pm
Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!
Yes you add a connector:zeltak wrote:Is there a way to add onDie trigger to a creature you spawn with a script?
Code: Select all
monster_name.monster:addConnector("onDie", some script, some function)
Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!
Thanks.SnowyOwl47 wrote: Yes you add a connector:Code: Select all
monster_name.monster:addConnector("onDie", some script, some function)
-
- Posts: 16
- Joined: Tue Sep 02, 2014 11:20 am
Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!
I guys, how can i kill a monster??
i had tried
also tried the methods
kill() and dieBastard()
and setHeath(0) ...
but the wizard still looking at me
-- EDIT --
I found this,
but it doesn't start the die animation...
i had tried
Code: Select all
function killWizard()
wizard_1.monster:destroy();
end
kill() and dieBastard()
and setHeath(0) ...
but the wizard still looking at me
-- EDIT --
I found this,
Code: Select all
function killWizard()
wizard_1:destroy();
end
Last edited by mpuppetier on Wed Oct 22, 2014 7:54 pm, edited 2 times in total.