jedidia Posted February 15, 2009 Share Posted February 15, 2009 Well, it's no trouble toggling the whole AI via console. It seems kind of strange to me that it can't be done in a script, but I seem unable to find a function for this (it seems to be possible to send a string to the console with fose, but that isn't compatible with my version). It seems no trouble to toggle a single character, but I don't intend making a script for them all that deactivates and reactivates their AI one by one. If anyone is wondering why I would want to shut down the whole AI, three words: turn based combat! I took a look at Mentils AP-mod, and it could be improved rather drastically by just toggling the AI, so you actually have your turn in peace. Works like a charm when I toggle it in-game via the console, but that of course is not an option. THere just HAS to be a way to do it with a script! Link to comment Share on other sites More sharing options...
DraykCannon Posted February 15, 2009 Share Posted February 15, 2009 To do this: if IsActorsAIDisabled == 1 setactorsai 0elseif IsActorsAIDisabled == 0 setactorsai 1endif as used in my Uber Perks mod Link to comment Share on other sites More sharing options...
jedidia Posted February 16, 2009 Author Share Posted February 16, 2009 Yes, that works allright if you know WHO it is you have to freeze. But how do I get these references without pinpointing everyone first and without adding a script to every single actor? is there a general function that checks a certain state of ALL actors? I'm not very familiar with the scripting language... is it possible to have a for - next loop that checks all characters in a certain range? On second thought, it might be possible to have an explossion with that effect... If the area of effect of a weapon can be adjusted, which I assume, but didn't find any indication of while shortly glancing at the frag grenade in the geck. To define the problem a bit more precisely, I have to deactivate the AI of all actors the player is in combat with. I do not know how to determine this. Link to comment Share on other sites More sharing options...
DraykCannon Posted February 25, 2009 Share Posted February 25, 2009 Crap, I gave you bad info. it's "isActorsAIOff" not "isActorsAIDisabled". Sorry! Link to comment Share on other sites More sharing options...
Cipscis Posted February 25, 2009 Share Posted February 25, 2009 You're right, you won't be able to script all Actors in order to check this. You'll either have to add a scripted token to all nearby Actors via a scripted explosion, or use FOSE's GetFirstRef, GetNextRef, Label and Goto in order to loop through all nearby Actors. Once you've done this, you'll need to define your conditions. As far as I know, there is no way to check if an Actor is in combat with a specific Actor, although you can check if an Actor is in combat via the IsInCombat. You'll probably want to check if the player is in combat, and if they are then check some things about the other Actor. For example, you might try using GetDetectionLevel and/or GetShouldAttack. I don't have experience with these functions, so I can't guarantee that they are what you want to use. Cipscis Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.