@AmenMoses, you are so right. It's just that I was so used to using those instead of if/elseif. It's like being used to using semi-colons at the end of statements or in VB6 using endif for the end of an if statement. I can't remember if C had the if/elseif but I know that VB6 did.
Here is how one of my "_Main" functions looks in GG and it certainly doesn't need Switch/Case statements.
if entity_state[e] == "text1" then
do_text1(e)
elseif entity_state[e] == "text2" then
do_text2(e)
elseif entity_state[e] == "show_map1" then
show_secret_map1(e)
elseif entity_state[e] == "show_map2" then
show_secret_map2(e)
elseif entity_state[e] == "leave_map" or entity_state[e] == "finished" then
--do nothing
elseif entity_state[e] == "collect_map" then
Collected(e)
Hide(e)
end
BTW, you see in the code above that I used the statement "Collected(e)" and used "Hide(e) to not show the entity any longer. I wonder if I should delete the entity instead; or would that delete the entity as being collected?
When in doubt -- C4 :heh, heh, heh:
-Jamie Hyneman