TobiaszPL Posted May 18, 2019 Share Posted May 18, 2019 Hello xDAgain small script, anything can be do better ? :D Scriptname QLG_SimpleScript_CrabShip extends Actor ;===- Base Info. -===; ;Created: 2019-05-18 ;Update: 2019-05-18 ( TobiPL ) ;Author: TobiPL ;Unit: M.PC<3> ;===- Var. setup -============================================ ActorBase Property QToSpawn Auto { ActorBase to Spawn after this Unit die } ;===- Script -Main- -================================================ Event OnDeath(Actor QKiller) self.PlaceAtMe( QToSpawn , Utility.RandomInt( 0 , 6 ) ) Utility.Wait(30.0) ;Wait for other Mods / Scripts self.disable( true ) ;Disable Utility.Wait(10.0) ;Wait self.delete() ;Delete EndEvent ;===- Script -===-===- ;ReDragon2013 ( NexusForum ) Event OnCellDetach() Self.Delete() ; Just in case ( Have to be verified ) EndEvent What script should do?After NPC die ( Crab Ship ) small crabs spawn under big crab body :DScript should spawn between 1 and 6 small crabs after big die im not sure about this "self" cause im not sure on what it is pointing xD also, testing my mod: xD https://www.youtube.com/watch?v=P3IfuVgoe90 ( Dont worry ReDragon and Maxarturo i will create "Hello" msg for you too :D ) {Vid. Time: 2:05} Link to comment Share on other sites More sharing options...
Evangela Posted May 18, 2019 Share Posted May 18, 2019 (edited) To me, you script is coded to do the following: When the actor dies, an actorbase is spawned, with the number of said actorbase randomly being between 0 and 6(I wonder how the game is going to handle it if 0 comes up) of them. After 30 seconds, to which the script is paused, the dead actor will be disabled. 10 more seconds later, it is deleted. As a failsafe(?), the dead after is deleted when the cell is detached. This means when the cell is no longer part of the loaded cells around the player(5x5 or 25 cells, by default), OR if the cell is an interior cell and the player leaves that cell. Self is exactly what it is. It is pointing to the object itself. You don't need to explicitly use it in certain cases. Example.. Scriptname somethingScript extends ReferenceAlias Event OnDeath(Actor akKiller) if (GetReference() as Actor).(sometfunction..) ... endif EndEvent Is the same as Event OnDeath(Actor akKiller) if (self.GetReference() as Actor) .... endif EndEvent Now if you were to have an object activate itself(for example), then you'd need to use the self variable and pass it to the function. Edited May 18, 2019 by Rasikko Link to comment Share on other sites More sharing options...
TobiaszPL Posted May 18, 2019 Author Share Posted May 18, 2019 (edited) Ohh right xD between 0 and 6 :Di don;t know how game will handle to spawn 0 actors but i don't want to know :D fixed to 1 / 6 :D //Edit:y, its deleted after 40 sec cause i also wanted to make "Blood explosion" from body and small crabs move out from dead body but idk how xDand its probably not possible with basic CK stuff cause i think i should make animation or something i was trying with creating and moving bones etc. with script but it was not looking good so i delete it but left delete NPC part :X Edited May 18, 2019 by TobiaszPL Link to comment Share on other sites More sharing options...
maxarturo Posted May 18, 2019 Share Posted May 18, 2019 (edited) Hey Toby. I have made a similar script as yours, but i can't post it because i'm not where near my PC, and i'm using my tablet. But, my quick fix to resolve the NPC's death and exploding spawning creatures without doing too much work, like creating particles or editing meshes in NifSkope, is pretty simple. Add to your script: explosion property BloodDecalPlaceExplosion auto self.PlaceAtMe( BloodDecalPlaceExplosion ) Just remember to set in the scripts properties the BloodDecalPlaceExplosion, and place in your script the self.PlaceAtMe( BloodDecalPlaceExplosion ) before the spawning creatures, also give it like 0.5 second before the creatures spawn, just to have a nice looking result. But that's up to you. * If i remember correctly in my script the sweet spot is 0.3 seconds. The explosion cover the sudden appearance of the creatures and does a nice FX before the creatures spawn after the NPC's death. Hope it helps... Edited May 19, 2019 by maxarturo Link to comment Share on other sites More sharing options...
TobiaszPL Posted May 18, 2019 Author Share Posted May 18, 2019 (edited) :o how it works? this explosion... what FX should i choice in properties ? :Dand it will self clear after playing this FX or i should clear it? im asking about clearing this FX cause i have "Spots" like in MMO gamesfor Example "Crab Rock" where you can go and kill crabs and new crabs will spawn after any will die so i don't want to place too many FX that can't be deleted / cleared from world :x... also can't test this script cause im home now xDafter 12 h in work xD OMFG tomorow i go again at 9:00 and leave at 20:00...so i will have a lot time to test scripts more xD im working for 12h / day but im almost not doing anything :3thats why i have time for CK in work xD //Edit:and ofc. its only "idea" for now with MMO Spots in Skyrimbut im gonna try it by adding every monster in Spot special script with OnDeath even... and when Monster die they cast special spell on Mannequinand Mannequin have his own Event "OnHit" and when he got hit he will spawn new monsters :D lel xD if there is any better way pls help ^_^in my opinion its good enought way to do it cause it will work anyway... probably...but maybe i can do it without creating mannequins... but... its CK xDi have no idea why we have to put chest for trading with NPC xDit was too hard bethesda to do in BaseActor window ? :tongue: hehe //Edit2:i want to play with friends Skyrim Multiplayer thats why we need Spots :Dto farm and lvlup infinitly :D also simple dungeons from Night World and simple Castles from Night World xDNight World https://www.youtube.com/watch?v=2JWAndMdsQU sry for music and sounds in this video xDits Korean Ahri from League Of Legends Voice :tongue: lel those castles you can "refresh" and place new Enemiesbut Night World was only for Singleplayer and it was broken xD once i start SaveTools and saw 57.000 forms in Night World when Skyrim.esp had only 24.000 xD too long MSG T_T sry again !...im just Tobi and i love writing :c... even if my english is bad... for that sorry too xD Edited May 18, 2019 by TobiaszPL Link to comment Share on other sites More sharing options...
maxarturo Posted May 18, 2019 Share Posted May 18, 2019 (edited) It's an explosion, that means it will play the FX like any other explosion FX. Play explosion > Spawn creatures > and that's it, you won't see any traces of the FX after it has finished playing. FX to choose in the properties : BloodDecalPlaceExplosion * Also i don't know how it will work with other mods, my script will be placed only in a few actors, like 10 of them, in key places of the mod. PS: What music mod are you using ? i realy liked it. Edited May 18, 2019 by maxarturo Link to comment Share on other sites More sharing options...
TobiaszPL Posted May 19, 2019 Author Share Posted May 19, 2019 You mean music in Braverock? - Fable / Spellforce Musicin Braverock Video it should be Witchwoods and Greatwood from Fable Nightworld?- Wither 3 / Dark Souls / Audiomachine / Two Steps and maybe something more...Nightworld is 3 years old :P ok i go to work so ill try this "blood explosion" ^_^ Link to comment Share on other sites More sharing options...
Recommended Posts