2 registered members (OptimusPrime, AndrewAMD),
14,580
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Who can explain skill in WED??
#286265
08/24/09 10:56
08/24/09 10:56
|
Joined: Aug 2009
Posts: 20
Noctis
OP
Newbie
|
OP
Newbie
Joined: Aug 2009
Posts: 20
|
I am learning SED, but I dont know this script I had searched in manual, what 's mean "The first 20 entity skills can be set in WED's entity properties panel" ? So what do skill use for ?? thanks reply.
|
|
|
Re: Who can explain skill in WED??
[Re: Noctis]
#286273
08/24/09 11:37
08/24/09 11:37
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
The "skills" are a set of 100 VARs that are "attached" to EACH entity as properties. So each entity has its own "local" set of values for you to store things in, like health, armour, ammo, etc To access those values you reference them like entity_name.skill5 etc. If it is an action, say assigned in WED, you would use my.skill5 etc. Do you follow me?
From within the WED editor, it only lets you access to the first 20 of these skills.
Now, access the skills by using skill1, skill24, etc is cumbersome, so you can use "defines" to relabel them for easier accessing. Lite-C defines and C-Script defines work the same but have a slightly different syntax. Check the manual. (The define you have shown is a lite-c define)
The define tells the compiler "every time I see argument1, replace it with argument2". So if you have #define health skill1 then everytime you use "health" in your source code, then the compiler will replace it with "skill1".For example my.health will be compiled as my.skill1. Much easier to read.
Hope this helps clear things up.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Who can explain skill in WED??
[Re: EvilSOB]
#286435
08/25/09 10:33
08/25/09 10:33
|
Joined: Aug 2009
Posts: 20
Noctis
OP
Newbie
|
OP
Newbie
Joined: Aug 2009
Posts: 20
|
Ok, I had seen how to use skills, But I don't still see The "skills" are a set of 100 VARs that are "attached" to EACH entity as properties. So each entity has its own "local" set of values for you to store things in, like health, armour, ammo, etc
Is it alway skill1:health, skill2:armor, skill3:ammo? So if I have a bullet entity,  Is it still skill1:health,skill2:armor ? Is it default ?? . Thanks reply.
|
|
|
Re: Who can explain skill in WED??
[Re: Widi]
#286459
08/25/09 11:54
08/25/09 11:54
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
I'll rephrase this a little. The "define" allows to to assign ADDITIONAL names to a skill. Think of it as a "nickname".
EG #define health skill5 #define damage skill5 From here on in, if you change/read my.health you are changing/reading my.skill5, AND if you change/read my.damage you are ALSO changing/reading my.skill5. The 'define's are not linked to any specific entity. So if you only use my.health with a player or enemy entity, then skill5 is its health. And if you only use my.damage with bullet-type entities, then skill5 is how much damage it does. ALSO you can CONTINUE using "skill5" as its name if you want, if the entity is not a player, enemy, or bullet.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Who can explain skill in WED??
[Re: EvilSOB]
#286610
08/26/09 07:31
08/26/09 07:31
|
Joined: Aug 2009
Posts: 20
Noctis
OP
Newbie
|
OP
Newbie
Joined: Aug 2009
Posts: 20
|
Ok i see, thanks very much. I love u ^_^
Last edited by Noctis; 08/26/09 07:35.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|