Jump to content

Recommended Posts

Posted (edited)

Basically, I've made a Hunger script that is added to a quest, which is started at run-time, and can never be finished/abandoned.

This, being my first script ever, I presume it is completely error-prone. I would be most grateful if errors could be found and detailed, so I may fix 'em and not make the same mistake in the future.

 

Thanks in advance!

 

 

  Reveal hidden contents

 

 

Edit: I have another problem. I slightly edited the script so that it would actually work (Following this short guide on making a script run at the start of the game.

 

 

  Reveal hidden contents

 

 

I get this from the Compiler Output :

 

  Reveal hidden contents

 

 

Any idea on how I can fix that?

 

Edit2: I changed the script-property to a Global Variable, fixing that "No viable alternative at input 'Property'" compile error, however I still get errors.

 

This is the slightly changed script :

 

 

  Reveal hidden contents

 

 

And these are it's compiler errors :

 

  Reveal hidden contents

 

 

Can someone please help me resolve these errors? Can't save the script without doing this, and I'll need to shut this compy off soon XD

Edited by GomuGomu64
Posted

Do you mind if i ask where you learnt to script? what tutorials did you follow and what did you do to improve?

i'm looking to start scripting and i really need to know how to go from beginner to harder stuff

Thanks

Posted

Oh jeez mate, I just started scripting like, 5 minutes ago. I basically asked questions on the forums (For things that didn't yield results on the CreationKit.com site) and worked from there. I also took a gander at a few scripts that maybe-kinda-sorta resembled a bare-bones of what I wanted to do.

 

Best go on the site, follow the tutorials, and when your stumped, ask questions here. The people 'ere are good.

Posted
  On 2/13/2012 at 6:20 PM, GomuGomu64 said:

Basically, I've made a Hunger script that is added to a quest, which is started at run-time, and can never be finished/abandoned.

This, being my first script ever, I presume it is completely error-prone. I would be most grateful if errors could be found and detailed, so I may fix 'em and not make the same mistake in the future.

 

Thanks in advance!

 

Great work I can't fault the logic here. I can see some interesting possibilities for the player e.g. being poisoned, reduced stamina etc.

Posted
  On 2/13/2012 at 6:51 PM, mysticism said:
  On 2/13/2012 at 6:20 PM, GomuGomu64 said:

Basically, I've made a Hunger script that is added to a quest, which is started at run-time, and can never be finished/abandoned.

This, being my first script ever, I presume it is completely error-prone. I would be most grateful if errors could be found and detailed, so I may fix 'em and not make the same mistake in the future.

 

Thanks in advance!

 

Great work I can't fault the logic here. I can see some interesting possibilities for the player e.g. being poisoned, reduced stamina etc.

 

Aye, but I slightly changed it because I mis-read a part of the code which I followed from a tutorial (That is now hyperlinked on my edited post), and I get compiler errors.

Mind checking out the edited script please? :3

Posted

I would recommend creating a global variable called fAA<Modder's Initials>hunger variable i.e fAAGGhunger

 

rather than using a non globle variable that will be used by multiple function/scripts.

 

It will be easier to access that way if you are writing numours scripts that need to access that data.

 

~~~~~~~~~~~~~~~~~~~

Also I'd make Magic effect bonuses for Well Fed or Hungry.

 

i.e

full = +10% Health/Sta Regen

-----------------------

Hungry = 25% HP drain

Mal-nurished = 50% hp drain

Starving = 75% health drain

Posted (edited)

I defined it under Misc->Global

 

It's a short variable....Perhaps I should make it a float?

 

Edit: Nope, changing it to a float didn't work.

Edited by GomuGomu64
Posted (edited)

Oh your problem is you cannot use fAAGGHunger with the '=' operator. Just kidding, just use '=='.

 

= means assertion

== means equality check

Edited by Crestfall
  • Recently Browsing   0 members

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