Jump to content

n00b Quest Scripting Help


rondivu

Recommended Posts

Ok, the solution to my problem is probably very simple but I must have overlooked it. :rolleyes:

 

Purpose:

To obtain a kill count of a certain types of creature w/out use of globals. Example: creatures that fly, or creatures that are vampires, etc.

 

Situation:

I created a Quest script that runs every frame and has variables in it only, and should only run when NOT in combat, and in Sneak Mode. (this should work) :thumbsup:

 

I created a spell that, when it hits a dead body, identifies that IT IS dead. Then it Identifies the type of creature it is. Here's where I am bashing my brains. :wallbash:

 

Once it identifies what type of creature it is, i want the script to TELL the Quest script to take one of the variables in it and + 1 that variable, effectively making it a quest script that COUNTS every time the spell successfully identifies the dead body.

 

I don't seem to understand how I can do that, because every time I refer to the script, it says I'm using it wrong or it doesn't identify my variable. :verymad:

 

I created a Quest, attached the Quest-script to it. Then i tried to refer to the Quest itself, or the questID, then i tried to refer to its Quest-ScriptId instead, still nothing works. Do I need to refer to the QuestID, or the scriptID, or the QuestName, if so, how do I obtain the variable and add one to it?

 

Format:

BEGIN scripteffectstart

IF getdead == 1

IF getcreatureflies == 1

set QuestID.QuestIdVariable to QuestID.QuestIdVariable + 1

disable ; I loot before I cast this b/c it makes bodies dissappear

ENDIF

ENDIF

END

Link to comment
Share on other sites

I have no idea why that wouldn't work. Any more information you can give me? If you can upload the .esp, I could take a look at it as well...

 

It could be that you need to put "QuestID.QuestIDVariable + 1" in parentheses, but I don't think so.

actually its easier if u look at it right now... since i have several scripts in testing. it's really short though.

 

Editor ID:

00AAEOSFXP

Quest Name: EOSF Counter

Priority 50

start game enabled

script:

________QuestScript____________

 

ScriptName 00EOSFQuest

 

short CrKiCounter

short DeKiCounter

short UnKiCounter

short HuKiCounter

short GiKiCounter

short VaKiCounter

short FlKiCounter

 

Begin GameMode

End

 

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

 

The spell itself is just a scripted spell (no additions or anything) but I haven't attached it because i'm still working on it. Here is the scripted spell script

 

________Magic Effect Script_________

 

scn 00EOSFGAINXP

 

short init

begin scripteffectstart

if getdead == 1

set init to 0

endif

end

begin scripteffectupdate

if init == 0

if getdead == 1

if getcreatureflies == 1

; this is where the script should go.

disable

elseif getcreaturetype == 1

 

elseif getcreaturetype == 2

 

elseif getvampire == 1

 

elseif getcreaturetype == 3

 

elseif getcreaturetype == 5

 

else

message "You must examine the corpse for understanding"

endif

endif

endif

END

 

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

Oh and here is the esp:

 

http://rapidshare.com/files/177693450/eosf.esp.html

Link to comment
Share on other sites

It looks like scripts don't like it when a quest name they're using starts with a number. I tried changing the name to MyQuest, AAEOSFXP, AAAAEOSFXP, and everything worked fine, but it still had the issue when changing the name to 11AAEOSFXP and 0AAEOSFXP.

While I'm at it, are you sure you want the kill counter checkers designed as a batch of elseifs? The current way, imps would only count for Flying, and not Creatures (which they also are). I also don't really understand the "You must examine the corpse" message if it's not any of the above creature types.

On a side-note, you don't necessarily need to include Begin/End loops for scripts.

Link to comment
Share on other sites

It looks like scripts don't like it when a quest name they're using starts with a number. I tried changing the name to MyQuest, AAEOSFXP, AAAAEOSFXP, and everything worked fine, but it still had the issue when changing the name to 11AAEOSFXP and 0AAEOSFXP.

While I'm at it, are you sure you want the kill counter checkers designed as a batch of elseifs? The current way, imps would only count for Flying, and not Creatures (which they also are). I also don't really understand the "You must examine the corpse" message if it's not any of the above creature types.

On a side-note, you don't necessarily need to include Begin/End loops for scripts.

Thank YOU! I want to draw a picture for you, of what, I don't know, but if you have any ideas, I'll try'em as a thank you.

 

About the kill counts... specifically, the purpose of the kill counts has to do with the character obtaining a skill after a certain amount of kill counts. (all of them are h2h related) I hadn't truly flushed out the specializations yet so my idea was to run that check. However, logically you are correct, I probably need to rewrite it as individual "if" statements (or do you have another way to do it... n00bs need help :biggrin: ) here are the ideas so far (feel free to come up with some if you think its necessary)

 

Winged Bane = enhancement for fighting against flying creatures

Pure Impact = powerful against undead/vampire

Serpents Maw = Advanced h2h skill in/under water

Acid Sting = uses a poisonous skill

Demon Eater = Deadra Killer technique/ability

 

P.S. you should post that on wiki that way ppl know that starting with numbers for names is bad for quest scripts.

Link to comment
Share on other sites

I want to draw a picture for you, of what, I don't know, but if you have any ideas, I'll try'em as a thank you.
Actually, do you think you could draw an upper-class, Akaviri, and slightly evil dagger or shortsword? I wanted to include one for a project on the backburner, but have no idea where to start with designing it...

 

Pure Impact = powerful against undead/vampire
Is that it for undead/vampire kills, or just an example? If that is it, you might just want to merge the Undead Kills and Vampire Kills variables.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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