Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Need help w/Force Push...
Need help w/Force Push...
2005-10-30, 4:26 PM #1
I want Force Push to push projectiles...

setting the flags to "0x40c" works great...

"if(type == 3) // WEAPON" works great...

Here's the problem: I only want Force Push to push slower projectiles (i.e., Thermal Dets, Rail Dets, & Sequencer Charges...

Can anyone helP?

Ultra thanks in advance.

_K_
2005-10-30, 11:47 PM #2
You can either check for the projectile's velocity or you can directly compare it's template with the ones you want to affect.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2005-10-31, 1:54 PM #3
Code:
if(VectorLen(GetThingVelocity(projectile)) < 2){ //2 is the speed, and projectile
//DO BLAH...                                                        is the projectile you're testing.
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2005-10-31, 10:16 PM #4
Hmmm.... tried this

Code:
Code:
pulse:

   // Check all things for our victim.
   victim = -1;
   maxDot = 0;

   // Search for all players, actors and slower velocity projectiles.

   potential = FirstThingInView(player, 50 * rank, 5 * rank, 0x40c);

   if(VectorLen(GetThingVelocity(potential) > 1))
 
   Return;


.... doesn't work... still targets STrifle bolts...

_K_

[ Code tags please.... ;) ]
2005-11-01, 4:37 PM #5
Well for one thing:

if(VectorLen(GetThingVelocity(potential) > 1))
Historians are the most powerful and dangerous members of any society. They must be watched carefully... They can spoil everything. - Nikita Khrushchev.
Kill one man, and you are a murderer. Kill millions of men, and you are a conqueror. Kill them all, and you are a god. - Jean Rostand.
2005-11-01, 6:40 PM #6
Well "if(VectorLen(GetThingVelocity(potential) > 1)" sure isn't going to do it...

_K_
2005-11-02, 6:16 PM #7
Sorry if I wasn't clear. The ending parenthesis was in the wrong place, and I just noticed that it should be GetThingVel(). It should be something like:

Code:
&& (VectorLen(GetThingVel(potential)) < maxSpeed)


This would be placed in the long condition that includes the HasLOS() check. And you should use something closer to 2 for maxSpeed because the player runs at 1.33.
Historians are the most powerful and dangerous members of any society. They must be watched carefully... They can spoil everything. - Nikita Khrushchev.
Kill one man, and you are a murderer. Kill millions of men, and you are a conqueror. Kill them all, and you are a god. - Jean Rostand.
2005-11-05, 2:36 PM #8
Hmmm.... this still doesn't work...

Code:
      if(
         HasLOS(player, potential) &&
         (potential != player) &&
         (VectorDist(GetThingPos(player), GetThingPos(potential)) <= (0.5 + rank / 2)) &&
         !(GetThingFlags(potential) & 0x200) &&	  
         !((jkGetFlags(potential) & 0x20) && !IsInvActivated(player, 38)) &&
	   
        !(VectorLen(GetThingVelocity(potential) > 1))
    
        )


What am I overlooking? There _must_ be a way to do this...
2005-11-05, 2:39 PM #9
Did you even read what I said? :eek:
Historians are the most powerful and dangerous members of any society. They must be watched carefully... They can spoil everything. - Nikita Khrushchev.
Kill one man, and you are a murderer. Kill millions of men, and you are a conqueror. Kill them all, and you are a god. - Jean Rostand.
2005-11-05, 2:46 PM #10
! DoH...!
I meant:

Code:
      if(
         HasLOS(player, potential) &&
         (potential != player) &&
         (VectorDist(GetThingPos(player), GetThingPos(potential)) <= (0.5 + rank / 2)) &&
         !(GetThingFlags(potential) & 0x200) &&	  
         !((jkGetFlags(potential) & 0x20) && !IsInvActivated(player, 38)) &&
	   
        !(VectorLen(GetThingVelocity(potential)) > 1)
    
        )


... still doesn't work...
2005-11-05, 3:53 PM #11
Double "DoH!" -- "GetThingVel" not "GetThingVelOCITY"...!

Thanks Centrist...!

Works like a charm...!

_K_
2005-11-05, 3:56 PM #12
Glad to help. ;)
Historians are the most powerful and dangerous members of any society. They must be watched carefully... They can spoil everything. - Nikita Khrushchev.
Kill one man, and you are a murderer. Kill millions of men, and you are a conqueror. Kill them all, and you are a god. - Jean Rostand.

↑ Up to the top!