Scripting: Can't figure out what's wrong with this.

Post » Wed Jun 20, 2012 3:38 am

So, I have a dragon. I'm trying to disable his ability to fly via (Actor).SetAllowFlying(false)

Sadly it's not working and I can't figure out why. The script is placed on the actor's regular scripts list, and compiles just fine, however, it simply doesn't work.

Scriptname MOD1NODRAGONFLIGHT extends ActorEvent OnLoad()self.SetAllowFlying(false)endEvent
User avatar
Code Affinity
 
Posts: 3325
Joined: Wed Jun 13, 2007 11:11 am

Post » Tue Jun 19, 2012 9:46 pm

I've read that some events don't seem to work properly. How about adding a debug message to make sure the script is actually receiving the OnLoad event?
User avatar
Curveballs On Phoenix
 
Posts: 3365
Joined: Sun Jul 01, 2007 4:43 am

Post » Tue Jun 19, 2012 6:27 pm

well, added a debug message, it didn't show up. So I'm guessing the script didn't ever run.
User avatar
Samantha Pattison
 
Posts: 3407
Joined: Sat Oct 28, 2006 8:19 pm

Post » Tue Jun 19, 2012 3:36 pm

You may need to copy the DragonRace as a nonflying variant:

DragonRace > NonflyingDragonRace (Turn "Flies" off in the copy)


and make your dragon of the NonFlyingDragonRace.
User avatar
Michelle Chau
 
Posts: 3308
Joined: Sat Aug 26, 2006 4:24 am

Post » Tue Jun 19, 2012 3:39 pm

You may need to copy the DragonRace as a nonflying variant:

DragonRace > NonflyingDragonRace (Turn "Flies" off in the copy)


and make your dragon of the NonFlyingDragonRace.


EDIT: I tried doing this yesterday. Been working on this for a long time. When I copied the dragon race, the copy race had no body for some reason. All the stats copied properly, but whenever I set my Dragon's race to the new race, it simply disappeared.

Anyway, to RandomNOOB, it appears the even wasn't working properly. I changed the event to OnInit instead of Onload, and it worked like a charm.
User avatar
Tha King o Geekz
 
Posts: 3556
Joined: Mon May 07, 2007 9:14 pm

Post » Tue Jun 19, 2012 5:15 pm

Ah, there's lots of other things you need to set up for a new race, sorry...you also need to make copies of the Dragon Skin and so on...someone made a tutorial for that, but I lost the link (He made a rainbow colored chicken as his example)
User avatar
Robert Jr
 
Posts: 3447
Joined: Fri Nov 23, 2007 7:49 pm


Return to V - Skyrim