Jump to content

Minor Script Problem


Ranokoa

Recommended Posts

Okay, so I have this boss that before wouldn't work the script properly, so what I did was split it up.

 

He WAS supposed to disable for some time after combat starts, then "phantoms" would appear for 25 seconds, and after which he would reenable and finish the fight.

 

That didn't work. I don't know why, but it didn't. So now what I have done is make him cast a spell on combat start, and the same script restrains him and moves him for a short time.

 

The spell enables and restrains the phantoms.

 

The phantoms have a script to run when they enable, basically starts with If GetDisable == 0 on a GameMode block, that doesn't need to be elaborated now because I am unsure if it doesn't work, and if it does I don't want to spoil the main boss fight events.

 

The problem is the boss doesn't cast the spell. The spell costs 0 mana, and he just doesn't. I even deleted his spell table list to ensure that he doesn't cast something else during combat so I can see if he did indeed cast the spell, and maybe it would just be the spell that's broken, but he doesn't cast the spell.

 

Here is the script, and anything past casting the spell doesn't need, at this time, be mentioned, because they are not the current problem.

 

Scriptname EG06R01MageCaptainBossScript

ref Self
ref Marker
short DoOnce
float timer

Begin OnLoad
Set Self to GetSelf
Set Marker to EG06R02MageMarker
end

Begin OnStartCombat
if DoOnce == 0
	Self.Cast EG06R01MageSpellScript Self
	Self.SetRestrained 1
	Set Timer to 30
	Set Timer to Timer - GetSecondsPassed
	set DoOnce to 1
	Self.SetActorAlpha .8
	PlayMagicShaderVisuals creatureEffectUndeadBlade
elseif DoOnce == 1 && Timer <= 0
	self.MoveTo Marker
	self.SetRestrained 0
	Self.StartCombat Player
	StopMagicShaderVisuals creatureEffectUndeadBlade
endif
end

 

That's the bosses script. My brain as of the last month or two been very... Well, aside from half my vocabulary vanishing my thinking and processing abilities are depleted, on top of a minor, already existent similar problem. I have ideas why, but nothing I can do about it. So it's more than possible I'm just forgetting something obvious and am unable to think of it because of my brain problems. >_< I don't know how else to say it, lol.

 

Anyways, any help to make this initial script work would be very much appreciated.

 

Be well, sleep well, fight well, live long.

~Ranokoa

Link to comment
Share on other sites

I'm just learning script so I might not be much help, but at least for testing you could see if the same script can be used to cast a generic spell, like a really big fireball on self. You could also try adding a magicka cost and some generic effect to the spell like light on self to see some sort of visual confirmation and possible issues with ai not understanding the spell being cast. If the light effect added to the spell works, but the rest doesn't, you will know that the spell can be cast but is not working. Otherwise you would know that some issue is stopping the spell from being cast. All that is based on the assumption that the game will not be smart enough to prevent the casting of a spell that was improperly scripted.

 

Is the boss a huge Guar? I don't think creatures that can't cast spells by default are able to use the Cast function. Also, if the spell script isn't compatible with an on self effect maybe that is messing things up? My last suggestion is to try reducing the spell to just causing running or just causing the big Guar to leave combat for testing purposes.

 

Since you seem to know what you are doing and I don't have much of a clue, I'm guessing you wouldn't make this mistake, but your if statement seems to me like there is nothing to cause it to go through a second loop. Wouldn't it just cast the spell that doesn't work, set himself to restrained, set the timer to 30 seconds minus the amount of time since the last frame in which the script was processed, do some visual effects and set DoOnce to yes... and then end? I don't know, maybe you have another script calling it back to loop again or (more likely) there is something about timers I don't understand.

 

Anyway, sounds like you are working on a cool mod, hope somebody more useful than me helps out soon :whistling:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...