Zorkaz Posted October 23, 2020 Share Posted October 23, 2020 If everything got filled you're on the right track. Link to comment Share on other sites More sharing options...
Andyno Posted October 23, 2020 Author Share Posted October 23, 2020 It's woking! Many thanks! :thumbsup: Now I'd like to try something similar, but with more options. This will be for mod ending. Not sure if you played original STALKER game, but there was a Wish Granter that player could use. More info here: https://stalker.fandom.com/wiki/S.T.A.L.K.E.R.:_Shadow_of_Chernobyl_endingsIn the game it was handeled somehow differently (automatic / based on player gameplay), but I decided to give the player to actual really make a wish. I think this is the best way to reward a player for finishing my mod, and it also brings homage to the original title. Its messagebox should look like this: I'll probably add some more options, this is only for making a picture... After the player will choose one of the options, he will be teleported to TZEndWishGranterMarkerRef. The initial Wish Granter should be also an Activator. What do you think? Link to comment Share on other sites More sharing options...
Zorkaz Posted October 23, 2020 Share Posted October 23, 2020 That's more complicated but basically in the same vein and doable. I have never added Specials to the player and am too lazy to look up how, so someone else might chime in. The last thing (+20hp) would be done via a perk, that adds a constant health spell though. Question is is it done via a button / triggerzone /Quest... etc Link to comment Share on other sites More sharing options...
dylbill Posted October 23, 2020 Share Posted October 23, 2020 (edited) This can all be done with script, not too complicated. Again, it depends on what you're going to attach the script to for what event you're going to use. If it's an activator again the script would look like this: MiscObject Property Caps 001 Message Property TZEndWishGranterMessage Auto Actor Property PlayerRef Auto ActorValue Property Strength Auto ActorValue Property Endurance Auto ActorValue Property Agility Auto ActorValue Property Health Auto Event OnActivate(ObjectReference akActionRef) If (akActionRef as actor) == PlayerRef Int Button = TZEndWishGranterMessage.Show() If Button == 0 PlayerRef.AddItem(Caps001, 50000) Elseif Button == 1 PlayerRef.ModValue(Strength, 1) Elseif Button == 2 PlayerRef.ModValue(Endurance, 1) Elseif Button == 3 PlayerRef.ModValue(Agility, 1) Elseif Button == 4 PlayerRef.ModValue(Health, 20) Endif Endif EndEvent Edited October 23, 2020 by dylbill Link to comment Share on other sites More sharing options...
Andyno Posted October 24, 2020 Author Share Posted October 24, 2020 (edited) Looks pretty straightforward. :thumbsup:But what about the teleportation? Would it suffice if I add a line to Property section, and also below every ModValue? So the final script should look like this...? MiscObject Property Caps 001 Message Property TZEndWishGranterMessage Auto ObjectReference Property TZEndWishGranterMarkerRef Auto Actor Property PlayerRef Auto ActorValue Property Strength Auto ActorValue Property Endurance Auto ActorValue Property Agility Auto ActorValue Property Health Auto Event OnActivate(ObjectReference akActionRef) If (akActionRef as actor) == PlayerRef Int Button = TZEndWishGranterMessage.Show() If Button == 0 PlayerRef.AddItem(Caps001, 50000) PlayerRef.MoveTo(TZEndWishGranterMarkerRef) Elseif Button == 1 PlayerRef.ModValue(Strength, 1) PlayerRef.MoveTo(TZEndWishGranterMarkerRef) Elseif Button == 2 PlayerRef.ModValue(Endurance, 1) PlayerRef.MoveTo(TZEndWishGranterMarkerRef) Elseif Button == 3 PlayerRef.ModValue(Agility, 1) PlayerRef.MoveTo(TZEndWishGranterMarkerRef) Elseif Button == 4 PlayerRef.ModValue(Health, 20) PlayerRef.MoveTo(TZEndWishGranterMarkerRef) Endif Endif EndEvent Edited October 24, 2020 by Andyno Link to comment Share on other sites More sharing options...
dylbill Posted October 24, 2020 Share Posted October 24, 2020 Yes that would work. An easier way to do it though for future reference is to just put that line at the bottom of the script so you don't have to copy it multiple times. MiscObject Property Caps 001 Message Property TZEndWishGranterMessage Auto ObjectReference Property TZEndWishGranterMarkerRef Auto Actor Property PlayerRef Auto ActorValue Property Strength Auto ActorValue Property Endurance Auto ActorValue Property Agility Auto ActorValue Property Health Auto Event OnActivate(ObjectReference akActionRef) If (akActionRef as actor) == PlayerRef Int Button = TZEndWishGranterMessage.Show() If Button == 0 PlayerRef.AddItem(Caps001, 50000) Elseif Button == 1 PlayerRef.ModValue(Strength, 1) Elseif Button == 2 PlayerRef.ModValue(Endurance, 1) Elseif Button == 3 PlayerRef.ModValue(Agility, 1) Elseif Button == 4 PlayerRef.ModValue(Health, 20) Endif PlayerRef.MoveTo(TZEndWishGranterMarkerRef) Endif EndEvent Link to comment Share on other sites More sharing options...
Andyno Posted October 25, 2020 Author Share Posted October 25, 2020 Alright. Thanks! :thumbsup: I'll test it, and come back if something won't work... Link to comment Share on other sites More sharing options...
Andyno Posted November 15, 2020 Author Share Posted November 15, 2020 I tried to improve immersion of my 1st script by adding a sound effect, but it doesn't want to succeed in compiling the script.I added the line "PlaySound (DRSVertibirdFlightLoadOpen)" above the "PlayerRef.MoveTo(TZStartVertibirdMarkerRef)" line, but it looks like it's missing something (possibly some Properties?)Can someone help me out with this, please? Link to comment Share on other sites More sharing options...
Zorkaz Posted November 15, 2020 Share Posted November 15, 2020 To play a sound write it like this MySound.playandwait(PlayerRef)MySound.play(Self) So the () includes the source of the sound Link to comment Share on other sites More sharing options...
Andyno Posted November 16, 2020 Author Share Posted November 16, 2020 Sorry, but I don't understand. Where should I put those lines? Are actually both lines needed?What does this mean: (PlayerRef) and (Self)? It looks like important but you suggest to replace it with (DRSVertibirdFlightLoadOpen)?So it doesn't need to be something specified in the properties section? Link to comment Share on other sites More sharing options...
Recommended Posts