viking99 Posted March 27, 2011 Share Posted March 27, 2011 (edited) Hi I am currently doing a cutscene where I disable the player controls and a follower npcREF investigate a place and is blown up.I have solved the first part but I can´t get the explosion part to work. I have examined the TrapGrenadeBunchSCRIPT But I can´t figure out how do modify it. I doesn´t seem to have a damage component to it? I Can hear the click of the areatrigger activator so I must be within the script. I am also considering if I can use placeAtMe and place an explosion in the NPC inventory. Does anyone how I should proceed with it? ( I know the script includes many options to disable the grenades but I only need to blow up the NPC so in short I don´t mind if the extra components are in the script but I don´t need them.) Should I write a new script using PlaceAtMe and add an explosion to the npcREF or can this script be edited to fit my needs? I ´ll include the script here:scn TrapGrenadeBunchSCRIPT ; a bundle grenades tied to a tripwire short detected ;check to see if the player has activated the trap. 1=activated, 0=not activated short button ;0 = disarm, 1 = don't disarm short trapDiff ;difficulty of the trap. If the player's skill is higher, they beat the trap. ref grenade short doOnce short rewardXPOnce short XPForDisarm ;======================================== begin onLoad setStage NQlvl 1 set detected to 0 end ;======================================== begin onTrigger if doOnce != 1 set doOnce to 1 playsound3D TRPGrenadeBouquet do 5 ;damage for 5 points endIf end ;======================================== begin onActivate if getActionRef == player setVatsTarget 1 if getDestructionStage <= 1 ;this is so the player can't pick up an activated grenade and disarm if player.getAV explosives >= NQlvl.TRAPGrenadeBouquetSkillReq ;This var is set when the NQlvl stage is set to 1 ShowMessage TrapGrenadeDetectMsg ;do you want to take the grenades? set detected to 1; else ShowMessage TrapGrenadeClusterActivateLowSkillMsg NQlvl.TRAPGrenadeBouquetSkillReq endif endif elseif getActionRef != player if doOnce != 1 set doOnce to 1 playsound3D TRPGrenadeBouquet do 5 ;damage for 5 points endIf endif end ;============================================ begin onHit playsound3D TRPGrenadeBouquet end ;============================================ begin gameMode if detected == 1 ;don't run stuff in game mode unless recently activated set button to getButtonPressed ;grab the button state, you don't know when this will be set if button > -1 ;if a valid response is received start doing stuff if button == 1 ShowMessage TrapGrenadeHarvest ;player chose to get grenades and deactivate trap player.additem weapGrenadeFrag 3 disable if rewardXPOnce == 0 if NQlvl.TRAPGrenadeBouquetSkillReq< getGS iLockLevelMaxVeryEasy set XPForDisarm to 0 elseif NQlvl.TRAPGrenadeBouquetSkillReq< getGS iLockLevelMaxEasy set XPForDisarm to TrapXPRewardVeryEasy elseif NQlvl.TRAPGrenadeBouquetSkillReq< getGS iLockLevelMaxAverage set XPForDisarm to TrapXPRewardEasy elseif NQlvl.TRAPGrenadeBouquetSkillReq< getGS iLockLevelMaxHard set XPForDisarm to TrapXPRewardAverage elseif NQlvl.TRAPGrenadeBouquetSkillReq< getGS iLockLevelMaxVeryHard set XPForDisarm to TrapXPRewardHard else set XPForDisarm to TrapXPRewardVeryHard endif set rewardXPOnce to 1 rewardXP XPforDisarm endif endif set detected to 0 ;stop running stuff endif endif end Edited March 27, 2011 by viking99 Link to comment Share on other sites More sharing options...
viking99 Posted March 28, 2011 Author Share Posted March 28, 2011 I solved the problem using this script I`ll post it so someone else can learn from it. SCN HMWolfhornEXPSCRIPT short addOnce Begin OnTrigger HMBullsEyeRanchREF If Getstage HMQ4 == 60 && addOnce == 0 HMBullsEyeRanchREF.PlaceAtMe FakeMediumExplosion HMBullsEyeRanchREF.kill HMBullsEyeRanchREF EnablePlayerControls 1 1 1 1 1 1 1 SetStage HMQ4 65 set addOnce to 1 endif End Link to comment Share on other sites More sharing options...
Recommended Posts