Leodoidao Posted April 25, 2008 Share Posted April 25, 2008 Greetings. I need some help with scripting. 1- What are the scripts for: -in killing a creature -in activating an object (in this case, opening a book) The mod JURASSIKA is on its final phase. The Landmass and dungeons are ready.. I am making the quest now, and I´ve been needing some help with scripts. A little video sample : Or some screenies Screenies Link to comment Share on other sites More sharing options...
DarkWarrior45 Posted April 25, 2008 Share Posted April 25, 2008 Greetings. I need some help with scripting. 1- What are the scripts for: -in killing a creature -in activating an object (in this case, opening a book) The mod JURASSIKA is on its final phase. The Landmass and dungeons are ready.. I am making the quest now, and I´ve been needing some help with scripts. A little video sample : Or some screenies Screenies Activating an object via scripts. This works in the "OnActivate" section of an item's script. Killing folks/creatures in scripts Link to comment Share on other sites More sharing options...
Leodoidao Posted April 25, 2008 Author Share Posted April 25, 2008 Thanx!!!! Now what´s the script for "in killing"... I could not find it Link to comment Share on other sites More sharing options...
nosisab Posted April 25, 2008 Share Posted April 25, 2008 Thanx!!!! Now what´s the script for "in killing"... I could not find it at scripting you must be aware ever about references, you are highly advised to use the wiki help you access via HELP at CS. if you meant verifying if the target was killed the function would be "GetDead" if is the function to kill the target that would be the "Kill" function, but there are some strangenesseg: if your script is a referenced kind, most of times the target of the script is already knew, so if youuse a function "Kill Player" you would not be killing the player, the reference ID Player here is the one that receives the 'credit' for the killing. The target, in a non reference script would be in the formKilledRefID.Kill KillerRefID". Note these reference are valid only for actors. the Activate function is one of most stranges, since if a "Begin OnActivate" block exist for certain activator, This block runs once and the 'normal' activation of the object would be lost, so you would be unable to read or take the book (with a OnActivate block) a second time. The topic about activators is long and mostly because the block is bugged, read with care the explanations of the dangers and workarounds and ever exploits possibles in this one (ever try the wiki scripting Help first, by all means) Avoid asking already answered questions on the very HELP of the CS (that will redirect you to the wiki) but fell free to do it if you get yourself stuck or in doubt about the more confounding ones. good luck in your scripting. edited to correct the function name to GetDead Link to comment Share on other sites More sharing options...
nosisab Posted April 25, 2008 Share Posted April 25, 2008 Since the concept of reference is so fundamental that mustn't be never a doubt about it if you want to script, I'll be putting here some concepts meant to reinforce this. aways a script is attached to an object (the concept of object being worth itself of an whole topic) this object is already assumed as the performer of the function. so being optional the use of its reference on it. But remember, explicit reference will be necessary even in a "reference" script if it is to be another that the attached object. follows an example over an object script (as this is ever an reference one) applied to a sword:Even if there are more than one sword with the same ObjectID in the game, the script will reference the one instance of this sword in game it is attached (never is to much to direct one to understand the concept of object, instance(s) of this object in game and reference to specific instance of the object). So, the script will assume than that instance of sword is its reference, being not necessary to give it at each called function. If you need to know who have it you will use the function GetContainer, this function will return the ref of what or who have it (BTW the ref of an NPC or most commonly the Player) or even a 'real' container like some chest... or "null" if it is lying around. This same sword can have another type of "reference script" as the one of the type Begin ScriptEffectStart). This second script is normally under 'enchantment' and is started when the 'magic' hits some target, and this target is the assumed reference for the script. So if the sword hit a goblin, this unlucky goblin (instance of goblin). not all goblins will be the target of its effects. The same is valid if the effect is 'area' kind, just all caught in the area would be instances affected, and if you wish to treat then separately you would need to retrieve each reference of each instance. So if the effect is absorbing health, you will need to give the reference of the one receiving it, as the one losing it will be automatic. often the one receiving the health will be the reference returned on the GetContainer, but since we are talking about a weapon most of time we would be interested at if the container is equipping it, so OBSE have a function GetEquippedObject 16 (slot for weapon) that verify this. Note that in this specific case the script will perform only and at each strike of the weapon. Special care must be given to scripts that have "Begin GameMode" since these will be running at each frame and such must be avoided as possible and must be tightly controlled if unavoidable as to not impact hardly the system. Link to comment Share on other sites More sharing options...
Leodoidao Posted April 25, 2008 Author Share Posted April 25, 2008 Thanx once again, but what I need is simple stuff: I´ve created a boss. The script I need is: If player kills him, he gets the next stage of the quest (IN killing <BOSS>, getstage... <>) How do I make this? Link to comment Share on other sites More sharing options...
nosisab Posted April 25, 2008 Share Posted April 25, 2008 Thanx once again, but what I need is simple stuff: I´ve created a boss. The script I need is: If player kills him, he gets the next stage of the quest (IN killing <BOSS>, getstage... <>) How do I make this? what you need is: If bossrefID.GetDead ; GetDead returns 1 if reference is dead, 0 if not SetStage xyzQuest stagenumber endif where bossRefID é the reference to the boss Remember, Get aways return a value "from" the reference, to give a value to the reference you'll use SetSomething or ModSomething, the difference is than Set give an absolute value to the function parameter and Mod add the valor to the actual parameters base. so: GetStage will return the actual stage number of the quest, you can use it to test purposes, but to alter you will need SetStage questXYZ "StageNumber" edit: number of the stage is commonly reffered as StageIndex Link to comment Share on other sites More sharing options...
Leodoidao Posted April 25, 2008 Author Share Posted April 25, 2008 Well, NOW I am learning something about scripting!! I´ll try it tomorrow, today no modding, lots of work to do... I hope it works! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.