NoGodMonk Posted June 28, 2018 Share Posted June 28, 2018 (edited) Hello everybody,I'm quite new to modding, namely completely noob, just trying to make a few steps out of Lokir's Tomb but in the last few days I've come to be completely stuck. I'm trying to create a sort of archery range where you can /pull a lever/press a button/activate an invisible trigger (but not a trigger volume)/any kind of active interaction from the player could fit this should fire 4 summoning spell /in a definite area/in a radius from the origin of the spell/at a specific marker/or any kind of limitation that makes me control where they spawn they should just have a lot of life and move around a bit without becoming aggressive, quietly taking your arrows, spells or whatever... I'm trying to do this because those guys can be some handy crash test dummies... plus I thought it could prove good exercise, BUT GOSH!!!It's almost a week of frustration... I tried to implement any ANY sort of activator and/or script I could find around in the creation kit and in various fora with any sort of linking structure going completely NOWHERE!!! Up to now I have on my side a working summonable creature, related magic effect, spell & echentment, book & staff... they all work as expected... but for now I really can't grasp all that code enough to tweak and mix and match parts of different scripts into one and I tried, and tried and again, and again... God knows... Can please somebody help? A solution is welcomed, strong hint are welcomed the same, explanations will reach the roof... Thanks everybody P.S. Sorry I didn't put tags on the topic, I don't know which tags are used in your forum. Edited June 28, 2018 by NoGodMonk Link to comment Share on other sites More sharing options...
morogoth35 Posted June 28, 2018 Share Posted June 28, 2018 (edited) Are you stuck on the script that will spawn the enemies? I think getting the enemies to move around without them attacking you is going to be the hardest part. But if you want a script that spawns enemies on activation you can use something like this: ActorBase Property Actor1 Auto ActorBase Property Actor2 Auto ActorBase Property Actor3 Auto ActorBase Property Actor4 Auto ObjectReference Property xMarker1 Auto ObjectReference Property xMarker2 Auto ObjectReference Property xMarker3 Auto ObjectReference Property xMarker4 Auto Event OnActivate(ObjectReference akActionRef) xMarker1.PlaceActorAtMe(Actor1) xMarker2.PlaceActorAtMe(Actor2) xMarker3.PlaceActorAtMe(Actor3) xMarker4.PlaceActorAtMe(Actor4) EndEvent Place the xmarkers where you want the enemies to spawn and then fill in the actorbase properties with your enemies actorbase. Edited June 28, 2018 by morogoth35 Link to comment Share on other sites More sharing options...
NoGodMonk Posted June 28, 2018 Author Share Posted June 28, 2018 WOW! That was fast!Thank you morogoth35.If I understand....I declare the existence of Actors 1 to 4 from the ActorBase (that's where I use the name of my custom base creature, right?), do the same for the markers and then they call the actors near themselves...It's really REALLY easier than what I was trying... no spell, no traplinkers... I suppose I can add the same way, to the same markers, evocation effect... and sound, maybe? Still I couldn't figure out a way to have 4 differrent activators cast a spell (to something else than the player) when the player activates something... (tried Dwemer button or primitives to activate 1 xmarkeractivator parenting 4 other xmarkeractivators containing the script, but also tried traplinker to link the four marker containing the script, tried activate an activator with script making it cycle (tried to copy and tweak the code from creation kit wiki) through 4 marker, and the same with the script attached directly to the button... last but not least I tried to use the defaultcastfromlinkonactivate but uses only aimed spells (I made the summoning aimed) and I couldn't figure out what "define the Spawn Node Type as an xmarker" could even mean... I suppose it has to do with the "CAST" of propertys but I haven't really understood it yet... Really, I know my ideas were convoluted and inefficient... still I feel I should know how to fire a spell on activate if I want to go somewhere with modding... Can someone point me towards a valid resource other than the creation kit wiki? About the docile creature... I realized they are still affected by another mod I have installed...But they are locked by navmesh and can't reach the player anyway, I think I'll try to rip them off of their fighting behaviours, or maybe using a Facion?... WOW I'm still so green but I like this soooooo much!! Thanks in advance to whoever will answer my LOOOOT of doubt! Link to comment Share on other sites More sharing options...
morogoth35 Posted June 28, 2018 Share Posted June 28, 2018 (edited) Do you want to have some kind of visual effect and/or sound play when the enemies are spawned on the xmarkers? If so then that's easy. And yeah you really seem to have made it way more complicated than what it should be. I could try and help you with the script but it's not going to teach you anything solid, why don't you want to use the creation kit wiki? It's one of the best ways for information on scripting and the ck in general. You could check out darkfox127 on youtube. He has a lot of different CK tutorials for pretty much everything there is. And the best way for people to help you is to be specific with what you want to do/need help with. Because now when you say that you want a spell being fired from an activator script, it doesn't tell us much about what kind of spell you want it to be. So if you could provide more information on what exactly you would like to do then it's way easier for us to help you. Edited June 28, 2018 by morogoth35 Link to comment Share on other sites More sharing options...
NoGodMonk Posted June 29, 2018 Author Share Posted June 29, 2018 Thank you again, I've been lucky... My spell, book, staff, and the whole damn cell probably work thanks to darkfox127, he is great!About the creation kit, it's not that I don't want to use it, but I couldn't find what I was searching, I'm using it extensively but sometimes it obviously gets very specific and I could use some explanation so I was wondering whether someone could point me toward some support material.What I've tried to do was to use script I found in the wiki or in various video tutorial adapting them to my needs but no default cast script seem to be able to fire a summon spell by default nor to fire a spell at something different than the player... (with one exception*)I'm sorry my request was pretty wide but I didn't want obsess on one single possible "architecture" cause I knew my ways were inefficient... and I didn't want to flood with a detailed report of a lot of very different failed attempts. And yeah, you caught me, I really would like to learn something solid :PSo can I advance a couple more questions?...1) where can I find a list of all the possible property types?2) where can I find a "translation" of all the things the like of "actronaut" and "abActorRef"... I see them in scripts but I usually don't understand what they are pointing at..I've searched the wiki for hours, and googled for other hours (and hours) with no success and I would really dodge the "Papyrus User Guide", it scares me!! I've found in the game scripts one that fakes a summoning (it's called FAKEsummon or something...) I suppose it's done exactly to use it whit script like the one you posted for me... I would like to try and use it on my own so I don't think to ask you more code for the effects.... but... I really don't mean to take advantage of your kindness, but in the end I do have a specific request about code. the defaultcastfromlinkonactivate script is the only default script that can be used with an activator instead of a triggerbox and the only one that includes the possibility to choose a target that's not the player, but the wiki says I need to "define the spawn node as an x marker" and I'm not even sure what it means let alone implementing it... can you (or someone else) show me the changes I need to do at the code? And it would be awesome some advice on how to link them all... do I need keywords or something? Thanks for your time and patience. Link to comment Share on other sites More sharing options...
morogoth35 Posted June 29, 2018 Share Posted June 29, 2018 I don't think there is a full list of properties but think of them like this: If you want to use something in the game in your script then it needs to be declared in the script as a property so that the game can know what that line of code uses what item. So as an example; Let's say you want to have 100 wheels of cheese spawn at the player. You then need to define the wheels of cheese as a property: Example script: Potion Property CheeseWheel Auto ; <-- This here is a property, you define what type the property is by the keyword that category uses. Skyrim declares food items as potions in the CK so we have to use potion as the keyword. Event OnActivate(ObjectReference akActionRef) Game.GetPlayer().PlaceAtMe(CheeseWheel, 100) EndEvent There is no real good source that explains all the words in papyrus other than to search for the ones you are unsure about. And I looked at the "defaultcastfromlinkonactivate" script and the scripter at bethesda just typed actronaut instead of "akActionRef", in this case the Event OnActivate allows you to name the ObjectReference and the akActionRef whatever you like, so actronaut isn't something that's universally in papyrus, only a word that developer used because he was bored or something. What exactly do you want to happen in the script? The script I posted does what you mentioned in your original post. Now you need to tell me what else you want it to do so I can see if I can help you with that, because you haven't said anything about what kind of spell you want to have cast. Link to comment Share on other sites More sharing options...
NoGodMonk Posted June 30, 2018 Author Share Posted June 30, 2018 (edited) Ok... real life called me back for a day and when I came back to my "kingdom" I realized sleep deprivation is not a good thing, cause I made such a mess in explaining what I was trying to do... First of all, I said defaultcastfromlinkonactivate a few times, but I was indeed talking of this and that's not the only mess... (main one though) To be super short and possibly clear: I'm trying to create a button that, when pressed by the player, makes an object cast a summon spell at a designated target So the button parent-activates the object containing the script which cast on a xmarker. The spell is a regular summon spell made duplicating summon familiar, changing the creature, the cost and made "aimed" to work with SpellZapScript. [but it's not needed anymore] Up until now there was no script at all, because I only messed up with existing scripts but the way you have declared the markers made me think of ObjectReference Property xMarker01 Auto Spell Property mysummon Auto Event OnActivate(ObjectReference akActionRef) mysummon.Cast(self,xMarker01) EndEvent Now... this is my very first script! It seems too short and straightforward to me... It compiles and auto-fills the property correctly, and obviously doesn't work... what am I missing?? should I insert an if to check the akActionRef? I don't think it's needed but I saw it on a loooot of scripts... Edited June 30, 2018 by NoGodMonk Link to comment Share on other sites More sharing options...
morogoth35 Posted June 30, 2018 Share Posted June 30, 2018 So you want let's say a button that when activated makes for example a rock cast a summon spell on an xmarker? If so then why? Summon spells don't have a projectile so it won't seem like the rock is casting the summon spell at the xmarker. Why not just make the button summon the creatures on the xmarker with the right visual effects of a summon spell? Link to comment Share on other sites More sharing options...
NoGodMonk Posted June 30, 2018 Author Share Posted June 30, 2018 (edited) You are always very fast! and kind to answer, thank you again! Yes, yes and yes, exactly!!! This summon spell has now a projectile visual effect (cause I made it aimed), but in the end it's unneeded and I understand the most efficient solution is to summon them the way you've explained me. Nevertheless, after 8 day of frustration I feel I'm missing something important, so I need to understand how to do this right, plus a similar implementation can get in handy for a bunch of different "in game wonders" and lately I'm even thinking that I haven't understood parenting (but, I've used it successfully in other places, so...)Last, understanding dwemer button is probably a primary asset...(and looking at four soulgems vomiting creatures is not that bad...) Edited June 30, 2018 by NoGodMonk Link to comment Share on other sites More sharing options...
morogoth35 Posted July 1, 2018 Share Posted July 1, 2018 (edited) Ok, I think I understand it now. I will try and make a script and a small test file that should do what you wanted and I can send it to you so you can see if it is what you meant. I will return here when it's complete. Edit: Ok I got it working. Do you mean something like this?: I couldn't get the spell to actually summon the creatures by itself, so I used the script to do that instead. If that's kind of what you want then here is the script: {The xMarkers that the spell is cast from} ObjectReference Property xMarkerCaster01 Auto ObjectReference Property xMarkerCaster02 Auto ObjectReference Property xMarkerCaster03 Auto ObjectReference Property xMarkerCaster04 Auto {The xMarkers that are the targets of the spell} ObjectReference Property xMarkerTarget01 Auto ObjectReference Property xMarkerTarget02 Auto ObjectReference Property xMarkerTarget03 Auto ObjectReference Property xMarkerTarget04 Auto {The spell that is cast} Spell Property SummonSpell Auto {The creature to summon} ActorBase Property SummonedCreature Auto {The explosion/visual effect to use if wanted} Explosion Property SummonExplosion Auto Event OnActivate(ObjectReference akActionRef) If (akActionRef == Game.GetPlayer()) ; <-- This checks to see if it is the player that activated it, and if it is then proceed with the script. ; First cast the spells from the pillars to the targets. SummonSpell.Cast(xMarkerCaster01, xMarkerTarget01) SummonSpell.Cast(xMarkerCaster02, xMarkerTarget02) SummonSpell.Cast(xMarkerCaster03, xMarkerTarget03) SummonSpell.Cast(xMarkerCaster04, xMarkerTarget04) Utility.Wait(1.1) ; Wait for the projectiles to hit the targets. ; Place the actors at the targets. xMarkerTarget01.PlaceActorAtMe(SummonedCreature) xMarkerTarget02.PlaceActorAtMe(SummonedCreature) xMarkerTarget03.PlaceActorAtMe(SummonedCreature) xMarkerTarget04.PlaceActorAtMe(SummonedCreature) ; Place the explosion at the targets. XMarkerTarget01.PlaceAtMe(SummonExplosion) XMarkerTarget02.PlaceAtMe(SummonExplosion) XMarkerTarget03.PlaceAtMe(SummonExplosion) XMarkerTarget04.PlaceAtMe(SummonExplosion) Else ; If it was not the player that activated the activator. ; Do nothing EndIf EndEvent So assuming that is what you want to do then you have to first attach a script to your activator, it can be a button or a lever or anything that you can activate. Then you need to place the 4 xmarkers on the object you want to have the spell be casted from, and then place 4 more xmarkers where you want the spell to hit. Then fill in the properties on the script with your spell, the actors to summon and the 8 xmarkers. If you don't get it working with the spell summoning the creatures on its own then you can adjust the "utility.wait()" time to whatever time it took for the projectiles to hit their target. Also if you want to use some other explosions or some other visual effects then change the explosion property to whatever you want there instead. I hope this helps and if you have any more questions feel free to ask! :smile: Edited July 1, 2018 by morogoth35 Link to comment Share on other sites More sharing options...
Recommended Posts