I am trying to learn how to add grants to a mod. I have the mod folder the manifest.txt thumbnail data folder grants.lua language folder with base-language.txt and the name and description of the grant shows up but not the objective! This is the code for grants.lua:
function CreateGrants()
CreateSandboxGrant();
end
function CreateSandboxGrant()
Objective.CreateGrant ( "Grant_Sandbox", 100000000, 0 )
Objective.CreateGrant ( "Grant_Sandbox_Deliveries", 0, 0 )
Objective.SetParent ( "Grant_Sandbox" )
Objective.RequireRoom ( "Deliveries", true )
end
this is the base-languages.txt:
objective_Grant_Sandbox Sandbox - The name.
objective_Grant_Sandbox_Description This will give you $100,000,000. - The description.
objective_Grant_Sandbox_Deliveries Build a deliveries zone - This will show up in the todo
thanks for helping but im really confused I even created different names for the grants and objectives but nothing works!
Grants objective not displaying?
Moderator: NBJeff
Re: Grants objective not displaying?
Perhaps...Might help?
Code: Select all
function CreateGrants()
CreateSandboxGrant();
end
function CreateSandboxGrant()
Objective.CreateGrant ( "Grant_Sandbox", 100000000, 0 )
--set a prereq
Objective.SetPreRequisite ( "Completed", "Grant_bootstraps", 0 )
Objective.CreateGrant ( "Grant_Sandbox_Deliveries", 0, 0 )
Objective.SetParent ( "Grant_Sandbox" )
Objective.RequireRoom ( "Deliveries", true )
--else try another room? deliveries isn't a real one maybe?
end
Re: Grants objective not displaying?
Brento666 wrote:Perhaps...Might help?Code: Select all
function CreateGrants()
CreateSandboxGrant();
end
function CreateSandboxGrant()
Objective.CreateGrant ( "Grant_Sandbox", 100000000, 0 )
--set a prereq
Objective.SetPreRequisite ( "Completed", "Grant_bootstraps", 0 )
Objective.CreateGrant ( "Grant_Sandbox_Deliveries", 0, 0 )
Objective.SetParent ( "Grant_Sandbox" )
Objective.RequireRoom ( "Deliveries", true )
--else try another room? deliveries isn't a real one maybe?
end
Perhaps It was not very clear. The grant itself works but just does not show the objective I wrote.
Re: Grants objective not displaying?
It looks ok to me two, but trying another room for sport to see if it changes things would be a thing to try... I am bettin deliveries isn't seen as valid somehow.
-If changing it doesn't get the objective to show, that's at least something to you can eliminate...
-If changing it doesn't get the objective to show, that's at least something to you can eliminate...
Re: Grants objective not displaying?
Brento666 wrote:It looks ok to me two, but trying another room for sport to see if it changes things would be a thing to try... I am bettin deliveries isn't seen as valid somehow.
-If changing it doesn't get the objective to show, that's at least something to you can eliminate...
As I stated, I have also done other rooms. Under [Objectives] it says the whole objective.grant thing. Sorry I'm new to modding and their are no tutorials.
Who is online
Users browsing this forum: No registered users and 6 guests

