Justintime235 Posted May 11, 2015 Share Posted May 11, 2015 Is it possible to have the resurrection script as a configuration? Such as resurrection and no resurrection or the time it takes to resurrect? I can't seem to find out if it can work.Thanks in advance.-Justin Link to comment https://forums.kleientertainment.com/forums/topic/53804-configuration/ Share on other sites More sharing options...
DarkXero Posted May 11, 2015 Share Posted May 11, 2015 What do you mean?You resurrect because when there is no wilderness mode in the server, you get an event listener to become a ghost and to resurrect.This is all in player_common.lua, just follow the "respawnfromghost" and its functions. There are two types of resurrection:1) You are given a reviver, like the telltale heart.2) You haunt something with a huge haunt value, like the meat effigy. All resurrections with sources start in 2 seconds, then the character switches from ghost to human stategraph, and goes into a different state, depending on the resurrection source. reviver_rebirth lasts 3,2 seconds and amulet_rebirth lasts 2,7 seconds. Link to comment https://forums.kleientertainment.com/forums/topic/53804-configuration/#findComment-636402 Share on other sites More sharing options...
Justintime235 Posted May 11, 2015 Author Share Posted May 11, 2015 @DarkXero, I mean would it be possible to add the resurrection in the Configure Mod section in the Mods menu. inst:ListenForEvent("death", function() inst:DoTaskInTime(5, function() inst:PushEvent("respawnfromghost", {source={name="Resurrection"}}) end) Link to comment https://forums.kleientertainment.com/forums/topic/53804-configuration/#findComment-636409 Share on other sites More sharing options...
DarkXero Posted May 11, 2015 Share Posted May 11, 2015 -- in modinfoconfiguration_options = { { name = "Resurrection", label = "Resurrection", options = { {description = "Yes", data = "Yes"}, {description = "No", data = "No"}, }, default = "Yes" },}-- in modmainif GetModConfigData("Resurrection") == "Yes" then AddPrefabPostInit("deadpool", function(inst) inst:ListenForEvent("death", function() inst:DoTaskInTime(5, function() inst:PushEvent("respawnfromghost", {source={name="Resurrection"}}) end) end) end)endOr you can call the global version of GetModConfigData from within deadpool's prefab. Link to comment https://forums.kleientertainment.com/forums/topic/53804-configuration/#findComment-636416 Share on other sites More sharing options...
Justintime235 Posted May 11, 2015 Author Share Posted May 11, 2015 @DarkXero, weird the mod neither says a error or crashes, Deadpool just does not resurrect. Link to comment https://forums.kleientertainment.com/forums/topic/53804-configuration/#findComment-636679 Share on other sites More sharing options...
DarkXero Posted May 11, 2015 Share Posted May 11, 2015 @Justintime235.files.zip Link to comment https://forums.kleientertainment.com/forums/topic/53804-configuration/#findComment-636704 Share on other sites More sharing options...
Justintime235 Posted May 11, 2015 Author Share Posted May 11, 2015 @DarkXero, Thank you so much!! Link to comment https://forums.kleientertainment.com/forums/topic/53804-configuration/#findComment-636716 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now