Jump to content

It should work damnit...


Vagrant0

Recommended Posts

Alright, now I'm getting a bit concerned. The spawning system refuses to work. Basically, I'm trying to make a scripted spell activate a series of activators when the spell is used and the player is within a certain area.

 

The activators seem to work properly, can be activated by normal means as well as by "activate player 1" in the console. But they aren't being activated by the spell.

 

scn VG0FodderSpawnerActivatorScript

short zpos
short rand
ref self
ref actor

begin onactivate
set actor to getactionref
set self to getself
set zpos to getpos z
set rand to getrandompercent
if zpos >=128
	if rand <= 20
	self.placeatme VG0SkeletonWarrior01	
	elseif rand >=21 <=70
	self.placeatme VG0UndeadSpawn01
	elseif rand >= 71
	self.placeatme VG0SkeletonArcher01
	endif
else
	if rand <= 70
	self.placeatme VG0SkeletonWarrior01	
	elseif rand >=71
	self.placeatme VG0UndeadSpawn01
	endif
endif
end

 

 

The spell uses a distance check on a marker. All the messages show up, so neither the spell settings or the distance check seem to be the problem.

 

scn VG0SpawnerProcSpellScript

ref actor
short var1
short rand

begin scripteffectstart
set rand to getrandompercent
set actor to getself
Message "This works"
if player.getdistance VG0RSAMarker01 <= 1500
message "You are near Marker01."
if rand <=20
VG0RSP1C.activate player 1
VG0RSP2A.activate player 1
VG0RSP1F.activate player 1
elseif rand >=21 && <=65
VG0RSP1D.activate player 1
VG0RSP1A.activate player 1
VG0RSP1E.activate player 1
elseif rand >=66
VG0RSP1B.activate player 1
VG0RSP1C.activate player 1
VG0RSP1E.activate player 1
endif
elseif player.getdistance VG0RSAMarker02 <= 1500
message "You are near Marker02,"
if rand <=30
VG0RSP2B.activate player 1
VG0RSP2C.activate player 1
elseif rand >=31 && <=80
VG0RSP2D.activate player 1
VG0RSP2A.activate player 1
elseif rand >= 81
VG0RSP2B.activate player 1
VG0RSP2A.activate player 1
VG0RSP2D.activate player 1
endif
endif
end

 

I've been over the script several times already with no improvment. So I'm wondering if there's just something I'm missing somewhere, or something I havn't considdered. As this was supposed to be the easiest part of the mod, I'm starting to wonder if this mod even wants to be done. Hopefully someone will come along and point me as to what the problem is.

Link to comment
Share on other sites

Could the problem be caused by using only ScriptEffectStart? I had trouble once with not all of the code in such a block executing, although I think that was caused by using MessageBox.

 

I'd suggest trying a gutted version of the script, which would, when cast, activate all of the thingies without bothering with any condition checks.

 

Activate player

Activate

Activate player, 1

 

Missing comma, it would seem.

Link to comment
Share on other sites

Makes sense, except now it refuses to do anything. As I've installed franciscos and a few other mods in the meantime, that probably broke it somehow even if the mods aren't enabled... So, I guess I won't be able to do anything else till I figure that out, or do a fresh install. Thanks anyway.

 

It's for the better really as people would want to use such mods and not have a conflict.

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...