Jump to content

Please help me get this simple script working


irswat

Recommended Posts

  On 9/4/2016 at 6:03 PM, irswat said:

Is there a function GetIsInt that returns whether a variable is an integer or not?

Not that I am aware of.

If it is a variable that is already on your script, then you should know whether it is an int or float. If you're wondering about global variables, they can all be treated as floats even if they have an int value (cause the game treats all global variables as floats).

Link to comment
Share on other sites

  • Replies 135
  • Created
  • Last Reply

Top Posters In This Topic

sorry, I updated the previous post.

For every twelve kills each sword will temper one level, up to 6 levels (72 kills/legendary). This is the context I need such a function:

KillLevel=(DuskfangFragCount.GetValue()/12)
if (KillLevel==KillLevel.GetValue() As Int)
	tempering=KillLevel*0.1
	TemperWeapon(tempering,tsasciduskblade)
endif
Edited by irswat
Link to comment
Share on other sites

I would guess that it would. But I'm a bit confused by SetItemHealthPercent. I've not ever seen it used in a mod before and it states that it does not work on items in a container. Well, the player inventory is also a container so... the only time it might work is when the item is lying on the ground? But that doesn't seem to be ideal. Might be worth asking at the SKSE thread for the correct usage.

Link to comment
Share on other sites

An alternative to the tempering could be boosting the enchantments, just have two effects with conditions so the weak is used when killcount hast reached the threshold and from then the strong is used, you could have multiple stages too.

Link to comment
Share on other sites

still having problems getting this killcounter working. Here:

I have attached this script to the two magic effects. Checked dawnfang to true, and duskfang is unchecked as false in CK.

  Reveal hidden contents


When I try to compile this I get the following error:

  Reveal hidden contents

 

This is the quest script. The name of the quest is DawnDuskTimer:

  Reveal hidden contents


Edited by irswat
Link to comment
Share on other sites

DawnDuskTimerScript Property DawnDuskTimer Auto ; This property type must be exactly the scriptname of the quest below! And must then be filled in ck with said quest.

The comment line you put in there is perhaps misleading you a little bit.

 

The first part is the script you want to reference. The second part is the variable name you want to use. Because it is the same name as a quest, the compiler is flipping out.

I bet if you changed it to:

DawnDuskTimerScript Property DDT Auto

it would compile (after of course changing all the other spots in the script where you call the DawnDuskTimerScript via the variable.)

Link to comment
Share on other sites

thanks I'll give that a try.

that worked! thanks!

When I fill the two GlobalVariables in CK, because they are counters is filling them with none the same as initializing them as 0? autofill doesn't seem to detect anything for them.

Edited by irswat
Link to comment
Share on other sites

The active magic effect that is attached to the enchantment that is attached to the weapon has a script called FangKillCounter. This script is never being executed and I'm not sure why.

  Reveal hidden contents



Active Magic Effect

  Reveal hidden contents

 

Edited by irswat
Link to comment
Share on other sites

You have to create the global forms in order to assign them to the property. In the CK go to Misc > Globals then add however many new globals you need.

 

As far as that script not running, I can't say for sure. If you aren't testing on a new game that hasn't seen any bit of this mod before, that could explain it. It could be that the effect is not sticking around long enough for it to recognize the event.

 

Soul trap, why not take a look at how that works since it performs actions when the actor dies. It uses MagicSoulTrapFXScript. You may not need to do exactly the same thing, but might give you some ideas.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...