Let me explain something in simple terms.
I fire a template.
The fired template is a projectile with :
explode=+createstaffexp
This template is a simple decorr creation with an attached cog.
Create:
Print("created");
Return;
Touched:
this=GetSenderRef();
source=GetSourceRef();
## What material is the thing made of that the projectile hit?##
if(GetThingFlags(source) == [insert flags for earth])
{
print("this is earth");
}
if(GetThingFlags(source) == [insert flags for metal])
{
print("this is metal");
}
etc etc
Return;
So far, it prints only "created".
It isnt detecting the things flags it hits.
Is this because it wont respond to a flag of 0x800000 earth becuase the actual earth object is 0x801048, and not precisely 0x800000?
How do i go about this?
Basically, I NEED THE CODING TO ALLOW:
a cog to respond to a touched message, and to detect the flags of the thing it just touched, to seperate this into different resulting explosion effects. The SAME needs to happen for surfaces!
OMG help. this is holding me back SO much.
Once i got the coding down, the weapons can be finished.
I fire a template.
The fired template is a projectile with :
explode=+createstaffexp
This template is a simple decorr creation with an attached cog.
Create:
Print("created");
Return;
Touched:
this=GetSenderRef();
source=GetSourceRef();
## What material is the thing made of that the projectile hit?##
if(GetThingFlags(source) == [insert flags for earth])
{
print("this is earth");
}
if(GetThingFlags(source) == [insert flags for metal])
{
print("this is metal");
}
etc etc
Return;
So far, it prints only "created".
It isnt detecting the things flags it hits.
Is this because it wont respond to a flag of 0x800000 earth becuase the actual earth object is 0x801048, and not precisely 0x800000?
How do i go about this?
Basically, I NEED THE CODING TO ALLOW:
a cog to respond to a touched message, and to detect the flags of the thing it just touched, to seperate this into different resulting explosion effects. The SAME needs to happen for surfaces!
OMG help. this is holding me back SO much.
Once i got the coding down, the weapons can be finished.
Code:
if(getThingFlags(source) & 0x8){ do her} elseif(getThingFlags(source) & 0x4){ do other babe} else{ do a dude}