Operation Flashpoint Dragon Rising OFDR Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Trouble with Level Lua Scripting

2 posters

Go down

Trouble with Level Lua Scripting Empty Trouble with Level Lua Scripting

Post by gtaekwondo33 Fri 29 Mar 2013, 19:10

I made a short mission and have objective to reach a bunker and then take officer out for second obj then for secondary obj take sniper out then xfil for 4 obj...problem is I got the BUNKER
Code:
objstate=0;

function onMissionStart()
OFP:setObjectiveState("objective1","IN_PROGRESS")
OFP:setObjectiveState("objective2","IN_PROGRESS")
OFP:setObjectiveState("objective3","IN_PROGRESS")
OFP:setObjectiveState("objective4","IN_PROGRESS")
end

function onEnter_triggerzone1 (zoneName, unitName)
OFP:setObjectiveState("objective1","COMPLETED")
end

function onDeath_Officer(victim, killer)
OFP:setObjectiveState("objective2","COMPLETED")
objstate = 1
end

function onDeath_SNIPER (victim, killer)
OFP:setObjectiveState("objective1","COMPLETED")
objstate = 1
end

function onEnter_triggerzone2 (zoneName, unitName)
objstate=1
OFP:setObjectiveState("objective4","COMPLETED")
OFP:missionCompleted()
end
gtaekwondo33
gtaekwondo33

Location : United States
Points : 82
Reputation : 0
Join date : 2013-02-09
Age : 45

Back to top Go down

Trouble with Level Lua Scripting Empty Re: Trouble with Level Lua Scripting

Post by TheGeneral Fri 29 Mar 2013, 21:16

please post in the correct forums thanks Wink
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Trouble with Level Lua Scripting Empty Re: Trouble with Level Lua Scripting

Post by Guest Fri 29 Mar 2013, 21:47

My first piece of advice would be to make sure you name all of the entities involved in all lower case characters. Reflect those changes in your script. Try that and let us know if it works.

Cheers Very Happy
Anonymous
Guest
Guest


Back to top Go down

Trouble with Level Lua Scripting Empty Re: Trouble with Level Lua Scripting

Post by gtaekwondo33 Fri 29 Mar 2013, 22:08

sorry I tried to find the right topic...anyway I'm new to coding what is entities that need lower case
gtaekwondo33
gtaekwondo33

Location : United States
Points : 82
Reputation : 0
Join date : 2013-02-09
Age : 45

Back to top Go down

Trouble with Level Lua Scripting Empty Re: Trouble with Level Lua Scripting

Post by TheGeneral Sat 30 Mar 2013, 00:30

all of them. Get yourself into the habit of using lowercase lettering unless the parameters in the autocomplete state otherwise, like EBACKANDFORTH, ADDTOFRONT, etc.
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Trouble with Level Lua Scripting Empty Re: Trouble with Level Lua Scripting

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum