GowF3nv Posted August 8, 2013 Share Posted August 8, 2013 (edited) So I am attempting to write some scripts for my mod. The first is to disable a collision marker for either males or females with a single trigger box. Should I re-write my script, or figure some other way to trigger it? scn GenderTrigger Begin OnTriggerEnter player if GetIsSex Male CMM.disable elseif GetIsSex Female CMF.disable endif End My second script is simply to give a message based of your gender in game. Step into a trigger box, and the message should appear. Niether are. I am using a seperate trigger for each message. scn GirlMessageScript Begin OnTriggerEnter player if GetIsSex Female ShowMessage GirlMessage endif End Thanks in advance Edited August 8, 2013 by GowF3nv Link to comment Share on other sites More sharing options...
pkleiss Posted August 8, 2013 Share Posted August 8, 2013 You didn't really specify what the problem was with your first script, you only asked if you should rewrite or find a new way. To answer that I would need to know what the problem is. But I can guess. Nothing wrong with the logic, you just missed adding a reference for the GetIsSex function. Try these: scn GenderTrigger Begin OnTriggerEnter player if player.GetIsSex Male CMM.disable else CMF.disable ;You don't need the elseif becasue you already know if it's not a male, it's a female endif EndOf course, CMM and CMF must be the Ref IDs of your collision markers and they must be persistent. scn GirlMessageScript Begin OnTriggerEnter player if Player.GetIsSex Female ShowMessage GirlMessage endif End Link to comment Share on other sites More sharing options...
rickerhk Posted August 9, 2013 Share Posted August 9, 2013 You can also use GetPCIsSex http://geck.bethsoft.com/index.php?title=GetPCIsSex Link to comment Share on other sites More sharing options...
GowF3nv Posted August 11, 2013 Author Share Posted August 11, 2013 Thanks pkleiss, the one for displaying a message worked as it should. But the other one decided both collision markers would still be disabled at the same time. That was the problem before. Both CMM and CMF are checked for persistant reference. Link to comment Share on other sites More sharing options...
pkleiss Posted August 12, 2013 Share Posted August 12, 2013 Try setting one marker as the enable parent of the other, but set the "opposite" flag. That way you only have to enable/disable the parent and the child will automatically take on the opposite effect. However, the script I gave you should also work, which makes me think something else is going on. Link to comment Share on other sites More sharing options...
Recommended Posts