0 registered members (),
1,459
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
set health in wed by using a skill.
#455969
11/05/15 00:20
11/05/15 00:20
|
Joined: Jul 2001
Posts: 4,801 netherlands
Realspawn
OP
Expert
|
OP
Expert
Joined: Jul 2001
Posts: 4,801
netherlands
|
Question i want to set health points for a model in wed. Now I understand it not fully but here's is what i got so far. First i need to define it right like this : #define power skill1 then how in the action will it take the number i insert in wed in skill 1 ? thx for your time
|
|
|
Re: set health in wed by using a skill.
[Re: Realspawn]
#455972
11/05/15 00:31
11/05/15 00:31
|
Malice
Unregistered
|
Malice
Unregistered
|
If you select the model and set skill1 to 110 in WED the action should set the skill1 =110 when it starts up. However make sure you do not reset it in the action start up like this ...
action my_guy() { my.skill1=0; /// NO YOU RESET IT.
Last edited by Malice; 11/05/15 00:32.
|
|
|
Re: set health in wed by using a skill.
[Re: Realspawn]
#455974
11/05/15 01:13
11/05/15 01:13
|
Malice
Unregistered
|
Malice
Unregistered
|
Cool^ Notes - If this is a event, using a naming convention is a good idea. Also, while with a straight -1 you comp works but if you did -7(odd number) it will fail, consider using a <=. If this is a event, check event_type if using many event trigger ENABLE_IMPACT ENABLE_BLOCK ect...
function remove_brick_evnt() // Naming
{
if(event_type == EVENT_WHATEVER)
{
my.skill1 -=1;
}
wait(1);
if(my.skill1 <=0){
my.emask &= ~ENABLE_WHATEVER;
set(my,PASSABLE | INVISIBLE); // Should not be need and slows removal over all
//my.event = NULL; // Should not be needed
wait(1);
ent_remove(me);
}
}
Those are my note - Awesome job, good work. Mal
|
|
|
Re: set health in wed by using a skill.
[Re: ]
#455975
11/05/15 01:17
11/05/15 01:17
|
Malice
Unregistered
|
Malice
Unregistered
|
If your using WED to set skill1 this helps to know http://www.conitec.net/beta/customscript.htmlook at // skill1: name default // FLAG1: name default section
|
|
|
Re: set health in wed by using a skill.
[Re: Realspawn]
#455983
11/05/15 05:52
11/05/15 05:52
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
Question i want to set health points for a model in wed. Now I understand it not fully but here's is what i got so far. First i need to define it right like this : #define power skill1 then how in the action will it take the number i insert in wed in skill 1 ? thx for your time It would be nice to show names of those skills in WED. F.e. you want to set health in WED, but how do you know that first skill is for HEALTH? It's pretty easy
#define health skill1
// uses: health
action actHero(){
}
When you write comment 'uses' followed by ':' and the name of the skill, it will appear in WED skill list, so you'll be able to navigate in WED easily. BTW, I would suggest you to do now remove entity in it's event, just in case it all won't mess up at the end with some pointer problems. And I'm absolutely agree with Malice, about his advice of checking what kind of event currently is running. Best regards
|
|
|
Re: set health in wed by using a skill.
[Re: 3run]
#455984
11/05/15 06:56
11/05/15 06:56
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
3run is right but (as additional information) it's even easier if you don't want to define the skills first:
//skill1: health 100
//skill3: speed 10
//flag3: decoration 0
action actHero()
{
...
}
Note that this will NOT work if you don't set default values (like 100,10,0 in my example).
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: set health in wed by using a skill.
[Re: Superku]
#455985
11/05/15 07:18
11/05/15 07:18
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
3run is right but (as additional information) it's even easier if you don't want to define the skills first:
//skill1: health 100
//skill3: speed 10
//flag3: decoration 0
action actHero()
{
...
}
Note that this will NOT work if you don't set default values (like 100,10,0 in my example). I didn't know this one! Very useful, thank you Superku! Best regards!
|
|
|
Re: set health in wed by using a skill.
[Re: 3run]
#455995
11/05/15 11:10
11/05/15 11:10
|
Joined: Jul 2001
Posts: 4,801 netherlands
Realspawn
OP
Expert
|
OP
Expert
Joined: Jul 2001
Posts: 4,801
netherlands
|
very usefull from the both of you some good information thank you. I gues i am still doing stuff wrong. here is what i got now :
#define power skill1
// uses: power
action crashing_b()
{
set(my,METAL | SHADOW);
my.emask |= (ENABLE_IMPACT | ENABLE_ENTITY);
my.event = remove_br;
c_setminmax(my);
}
No txt is showing up on skill1 and that is in Wed where i want to insert the power number to be used. what am i missing ?
Last edited by Realspawn; 11/05/15 11:20.
|
|
|
|