Evening everyone!, hope everyone is well.
I'm writing this at 3:00am, in the morning where I'm at so please bear with me, been having a hard time with the Creation kit finishing my project, which is because I'm a total noob at scripting
I wanted to at least figure out one of these problems on my own before asking for help, but after three days of frustration I gotta try something different. All I need to do is compile these scripts and my Quest mod will be pretty much finished and it will truly complete this project.
Basically I'm trying to create a Teleport Script and a Event Script, I'll explain what I'm trying to do below:
Teleport Script
This one I've had some progress with but to no avail. Fortunately I've seen this work before in other mods so I know its possible, and what I'm trying to do is basically have a script attached to my spell that allows me to teleport to a Xmarkerheading located in a custom worldspace and if used again recall me back to my previous location. (Example: if I use the spell in Whiterun inn to teleport to the worldspace then use the spell again in the worldspace it will teleport me back to whiterun inn)
I've add some success teleporting to the worldspace with this basic script which works great, but I'm not able to teleport back to my previous location.
Scriptname Teleport_Spell_Script extends activemagiceffect
ObjectReference property teleDest auto
Event OnEffectFinish(Actor Target, Actor Caster)
target.MoveTo(TeleDest)
EndEvent
I've also tried this one I found, which teleported me to the worldspace but needed a marker in the skyrim to recall to.
ScriptName CDC_TeleportScript extends ActiveMagicEffect
ObjectReference Property HomeMarker Auto
{A marker where the caster will be moved to when teleport is cast.}
ObjectReference Property ReturnMarker Auto
{A second marker originally placed at the same location as the home marker.}
Event OnEffectStart(Actor akTarget, Actor akCaster)
if akCaster.GetDistance(HomeMarker) < 5000 ; if already at home (i.e. near the home marker)
akCaster.MoveTo(ReturnMarker) ; go to return marker
else ; if not at home
ReturnMarker.MoveTo(akCaster) ; set return marker
akCaster.MoveTo(HomeMarker) ; then go home
endif
EndEvent
Event Script
Unfortunately for this one, I have no scripts to post, because this one is very specific, and didn't really find anything really close to what I needed, and I don't know if I really need scripts for this one but I think I do. This one is really important because it's part of the quest, basically I need a script that spawns creatures on certain days. For example I have it that Draugrs,Bandits and creatures attack this village on weekends at specific times, these enemies all have packages so they will do their job, and I already have their spawnpoints ready, I just want them to spawn on their own at these times- everytime. I Have the amount of npc's placed already, and I'm assuming I need a script attached to them? I tried to have them "initially disabled" hoping they will spawn to complete their packages but that failed horribly. But this is my goal:
(Fredas) Friday: 8:00pm : Creature Attack
(Loredas)Saturday: 8:00pm : Draugrs Attack
(Sundas)Sunday 8:00pm : Bandits Attack
and so on.
I have about 20 of each placed, so when they all die they don't respawn till the following week.
So that's basically it, I hope someone can help me out. I really want to get this mod finished for Skyrim remastered and after looking at it, these are the last two missing pieces I need to finish this project. Thank you all for your time and I apologize if I didn't explain something clearly. I tried to do this without the use of scripts, but after hours of messing around in the CK I realize this is simply not possible.
Once again, Thanks for time