Jump to content

New Modder--Need Help with Scamp Mod


Ruinel

Recommended Posts

So I followed this tutorial on creating a creature companion mod. I plan on starting a new Oblivion character based off of my ESO alt, Agatha Cheddarbane. She was a sorcerer and always accompanied by her scamp, Freddie. But I've run into a couple problems/questions.

 

First and most important, whenever I activate Freddie in the game the script will run and the message appears, but he won't follow. His summon spell works fine, too. This is the script I'm using (sorry about the lack of indentation):

 

scn cmFreddieRevisedScript
ref rEnemy
short doOnce
ref GetSelf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
begin OnActivate
if IsActionRef player
SetIgnoreFriendlyHits 1
if doOnce == 0
Player.addspell cmFreddieSpell
set doOnce to 1
endif
if (GetSelf.GetForceSneak == 0) && (player.IsSneaking == 1)
GetSelf.SetForceSneak 1
elseif (GetSelf.GetForceSneak == 1) && (player.IsSneaking == 0)
GetSelf.SetForceSneak 0
endif
if FreddieFollow == 1
set FreddieFollow to 0
Message "'Freddie, you good for nothing Daedra! Time out!'"
elseif FreddieFollow == 0
set FreddieFollow to 1
Message "'Alright, Freddie. Let's go. This place is too boring.'"
endif
EvaluatePackage
playGroup Idle 1
else
activate
endif
end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
begin OnStartCombat
;make sure not to attack friends after accidental hits.
set rEnemy to getCombatTarget
if GetShouldAttack rEnemy == 0 && Player.GetShouldAttack rEnemy == 0
StopCombat
StopCombatAlarmOnActor
playGroup Idle 1
return
endif
It may be important to note that I did in fact link the summon spell to a wedge of cheese before setting it to Freddie, but I have deleted it.
Player faction, empty inventory, changed the spells so his attack was more powerful...
And instead of writing everything down for the AI and making things confusing, if you could just review these pictures:
If you need any more information, please let me know. I have a feeling that the problem may be about Freddie being a scamp, as someone who wanted to do this to minotaur is having the same problem.
My next topic is a question. How do I make Freddie purple? I am a complete and total noob at this, so I'll need a lot of detail. I have the meshes and textures. Is there any certain way I have to have them organized? Note that the textures are not included in the .nif files and that they are separate, so when I pull up the head or body on NIFSkope it appears white. How do I get everything into one model that can be pulled up as a purple scamp on the construction set?
Thanks for reading this, and thanks for helping out a newbie. Please be patient with me as I've only just begun to grasp this stuff. Do ask any questions you need.
Edited by Ruinel
Link to comment
Share on other sites

  • 3 weeks later...

I think the problem is that you created 2 global variables instead of just the one.

 

The "FreddieWander" global should be deleted and the condition in the "FreddieWander" package should be....

 

no GetGlobalValue Global "FreddieFollow" == 0

 

The condition in the "cmFollowFreddie" package also needs setting to .....

 

no GetGlobalValue Global "FreddieFollow" == 1

 

Try these and let me know what happens.

 

 

Edit........ Changing the scamps colour isn't too hard, but let's sort the lack of following out first. :smile:

Edited by zwkdiv
Link to comment
Share on other sites

  • 1 month later...

 


 

I think the problem is that you created 2 global variables instead of just the one.

 

The "FreddieWander" global should be deleted and the condition in the "FreddieWander" package should be....

 

no GetGlobalValue Global "FreddieFollow" == 0

 

The condition in the "cmFollowFreddie" package also needs setting to .....

 

no GetGlobalValue Global "FreddieFollow" == 1

 

Try these and let me know what happens.

 

 

Edit........ Changing the scamps colour isn't too hard, but let's sort the lack of following out first. :smile:

 

 

I know it's been...months? since I posted this and you answered, but thank you so much! Yes, I think you're right about that. I make the stupidest mistakes! -_- Anyway I'm working on fixing that now, I'll tell you what happens.

Edited by Ruinel
Link to comment
Share on other sites

  • 4 weeks later...
  • Recently Browsing   0 members

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