2 registered members (7th_zorro, 1 invisible),
942
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Action not found
[Re: Thehawk]
#72441
04/28/06 16:29
04/28/06 16:29
|
Joined: Sep 2003
Posts: 2,174 Israel, Haifa
ROMAC
Expert
|
Expert
Joined: Sep 2003
Posts: 2,174
Israel, Haifa
|
You have function main which is a function that is called when the engine starts. In there you need to call level_load(level_name)Actions are defined outside of the function anywhere in the code, they look like this: Code:
action test { // code goes here while (1) { wait(1); } }
You can't make an action inside a function, it must be outside, anywhere you want.
|
|
|
Re: Action not found
[Re: ROMAC]
#72442
04/28/06 16:30
04/28/06 16:30
|
Joined: Aug 2003
Posts: 7,439 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,439
Red Dwarf
|
a common mistake is to place functions/actions OVER the main function, which also results in a action not found.
you must place it AFTER the main function in order to make it work correctly
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Re: Action not found
[Re: Michael_Schwarz]
#72443
04/28/06 16:32
04/28/06 16:32
|
Joined: Sep 2003
Posts: 2,174 Israel, Haifa
ROMAC
Expert
|
Expert
Joined: Sep 2003
Posts: 2,174
Israel, Haifa
|
Quote:
a common mistake is to place functions/actions OVER the main function, which also results in a action not found.
you must place it AFTER the main function in order to make it work correctly
That shouldn't be a problem. Placing actions/functions over the main function is fine, you do it all the time when you use include.
|
|
|
Re: Action not found
[Re: Michael_Schwarz]
#72445
04/28/06 17:03
04/28/06 17:03
|
Joined: Jun 2004
Posts: 2,234 Wisconsin USA
FoxHound
Expert
|
Expert
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
|
I've never had a problem when placing functions over Main. I always do this.
However the orginal quesiton is not answered.
I think you need to make a script, and from there put in your actions. If you have done this then you have not connected the script with that level. If you have done both of these make sure that you have spelled the name of your action correctly.
--------------------- There is no signature here.
QUIT LOOKING FOR ONE!
|
|
|
Re: Action not found
[Re: FoxHound]
#72446
04/28/06 19:58
04/28/06 19:58
|
Joined: Sep 2002
Posts: 199 Chicago, Illinois
Thehawk
OP
Member
|
OP
Member
Joined: Sep 2002
Posts: 199
Chicago, Illinois
|
Thanks for all of your replies. Foxhound you are closer to the solution to my problem. I've tried to create a script seperate from my main level. These included all the actions and functions than I would need for the second level of the game. (Where the player goes after stepping through the teleporter in level 1) the script looks like this: Code:
action level_change { my.event = impact; my.function = Load_level; }
function load_level
{ if blah blah blah { load_level (levelname.wmb) /*The tutorial i used said to place any actions for the next level after that level's loading function... which would be here */
other stuff }
But the problem is when I do that, the engine says: action Change_level is an unkown parameter. i hope this is clearer.
|
|
|
Re: Action not found
[Re: Thehawk]
#72447
04/28/06 20:03
04/28/06 20:03
|
Joined: Aug 2003
Posts: 7,439 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,439
Red Dwarf
|
maybe becuase its called level_change and not change_level?
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Re: Action not found
[Re: Filipe]
#72449
04/29/06 00:34
04/29/06 00:34
|
Joined: Jun 2004
Posts: 2,234 Wisconsin USA
FoxHound
Expert
|
Expert
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
|
I think I know your problem. You haven't included your scecond script into your main script. Basically you only make on set of scripts. You add them as "includes" into the main script, which is what you set for all the levels. You don't make one script for each level.
--------------------- There is no signature here.
QUIT LOOKING FOR ONE!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|