PierreBeauregard Posted June 21, 2004 Share Posted June 21, 2004 Since Mod[Attribute] doesn't accept variables, I'm trying to get the "workaround" working by incrementing until the value I want is satisfied. Currently, I'm trying to get my guar mod to make the guar's speed and health fairly close to the player's, so it adjusts to your level. I have the following code (tested for syntax errors already):;make guar speed equal to player speedset my_speed to GetSpeedif ( my_speed < ( Player -> GetSpeed ) ) ModSpeed 1 set my_speed to GetSpeed MessageBox "Guar speed: %g", my_speedendif ;make guar health comparable to 2/3 player healthset my_health to GetHealthset my_health to ( my_health / GetHealthGetRatio )set player_health to ( Player -> GetHealth )set player_health to ( player_health / ( Player -> GetHealthGetRatio ) )if ( my_health < ( player_health * 2 / 3 ) ) ModHealth 1 set my_health to GetHealth set my_health to ( my_health / GetHealthGetRatio ) MessageBox "Guar health: %.0f", my_healthendif Ideally, the message box should pop up every single time the attribute gets modified (this is how I found out it *wasn't* working). It doesn't even seem to be satisfying the if statements. If you put the message box BEFORE the if statement, it spits out the guars preset health/speed values, which are smaller than the player's health/speed values. Even more strangely, the ModSpeed works from the console in the middle of the game when you have the guar selected. This has been driving me bonkers for the whole day. Can anybody help? Link to comment Share on other sites More sharing options...
PierreBeauregard Posted June 22, 2004 Author Share Posted June 22, 2004 Well, I figured out the problem. Apparently, TES3 scripts are much pickier than other programming languages I'm used to. I fixed it by making sure the if statements used variables without arithmetic, and no variable was a modification of itself. If you guys want to see the result of my first attempt at modding, you can see for yourself:http://mwsource.com/uploads/uploads/Intell...PackGuarCTN.zip I just added it to the mod section :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.