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 → 2 questions.
2 questions.
2003-12-29, 10:59 AM #1
Hi!
1. How do I make a projectile (like a raildet) fly around like if it's being controlled by a player, yet quite random.

2. How do I make a BoxTurret look in random direction, then when a player activates it, player sees what turret sees and can turn its head around (left right on head, up down on pipes) and when I shoot, I can control this projectile and detonate with another shoot. Exit with secondary shoot.

Oh, and its for JK MP. Help me ASAP, thanks.

/Edward
Edward's Cognative Hazards
2003-12-30, 5:10 AM #2
You could ask GBK for help, if he knows. [http://forums.massassi.net/html/wink.gif]

------------------
-"Thank the Maker!"-
-"Thank the Maker!"-
2003-12-30, 9:18 PM #3
Is this MotS? If so, PlayerAction is the key to everything. Check out Datamaster for the lowdown. You need to know the parameters and how to use them.

------------------
"The Just shall live by faith." -Galatians 3:11
"Now faith is the substance of things hoped for, the evidence of things not seen." -Hebrews 11:1
"There is one body, and one Spirit, even as ye are called in one hope of your calling; One Lord, one faith, one baptism, One God and Father of all, who is above all, and through all, and in you all. But unto every one of us[/i] is given grace according to the measure of the gift of Christ." -Ephesians 4:4-7

The Giant Internet IC Masturbator - the most complete index of IC chips on the net.
Catloaf, meet mouseloaf.
My music
2003-12-31, 1:20 AM #4
Quote:
<font face="Verdana, Arial" size="2">Originally posted by DogSRoOL:
Is this MotS?
</font>

Quote:
<font face="Verdana, Arial" size="2">Originally posted by Edward:
Oh, and its for JK MP.
</font>
Edward's Cognative Hazards
2003-12-31, 3:10 AM #5
well for turret thing you can use the vectors of the player and trasferthem to the turret. for shotting.. i dunno, your could put the player in a 3do box and record the damaged flag from his wepons. but the secondary shot woudl be a problem... unless you remove one of the wepons and replace the turret with it... but i dunno if your expirensed anough to do that..

the raildet could be a actor... just a idea to save time...

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-12-31, 11:14 AM #6
That is VERY complex stuff man. If you aren't too experienced in cog, you might wanna look for an easier alternative to get what you want done.
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
2003-12-31, 3:31 PM #7
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Protocol_Droid2:
You could ask GBK for help, if he knows. [http://forums.massassi.net/html/wink.gif]
</font>


I need to start comming back to Massassi more, the people I came into Massassi with are or would be horrified at what is becoming and to have someone know who I was, I mean am. [http://forums.massassi.net/html/tongue.gif] And why doesn't anyone think of SM either. That is someone who people should know more then little ole me.

But as its been mention, this is very complex, you need an edited weapon cog, the turret cog, and a projecile class cog to do both of those. Its not easy, I could give you the basic idea and the projectile class cog, but you'd have to do the rest.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

The 2 riddle!

[This message has been edited by Descent_pilot (edited January 01, 2004).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2004-01-02, 7:51 AM #8
We know who you are. [http://forums.massassi.net/html/tongue.gif] Or at least I do. Youi just need to release some of that magic, DP.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-01-02, 8:30 AM #9
My magic takes time, and its my writers block. [http://forums.massassi.net/html/tongue.gif] Grismath, contact me on DPatMassassi for AIM if you want a preview. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

The 2 riddle!
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2004-01-02, 8:46 AM #10
w00t!
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-01-02, 9:28 AM #11
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Edward:
Hi!
1. How do I make a projectile (like a raildet) fly around like if it's being controlled by a player, yet quite random.
</font>


I wrote a mouse controller for JK some time ago. Its fairly stable, and Ive written more than a few piliotable missles from the concept.

Code:
# Mousie-vision.
#
# 11/2002 GBK
Symbols
Message Startup
Message Activated
Message Pulse
Message Timer
Message Damaged
Thing Player				Local
Thing Bot
Thing Cam				Local
Surface Switch
Flex Time
Flex Ac=1.5			#How fast?
Int StopFall=1		#Move in slow controlled fashion?
Int Fly=0			#Fly?
Sound Beep
Template G			#Ghost, prefferably.
Thing Gh=-1				Local
End
Code
Startup:
Sleep(0.5);
Player = JKgetlocalplayer();
Setwallcel(Switch, 0);
Capturething(Bot);
Stop;

Activated:
If(Getwallcel(Switch) != 0) Stop;
Setwallcel(Switch, 1);
Playsoundpos(Beep, Surfacecenter(Switch), 1, 0, 10, 0);
Cam = Createthingatpos(G, Getthingsector(Bot), Vectoradd(Getthingpos(Bot), '0 0 0.0001'), '0 0 0');
Attachthingtothingex(Cam, Bot, 0x8);
Setcamerafocus(0, Cam);
Setcamerafocus(1, Cam);
Setactorflags(Player, 0x40000);
Setpulse(0.01);
Settimerex(Time, 0, 0, 0);
Stop;

Pulse:
If(Getdebugmodeflags() == 0x400) Setpulse(0.0005); Else Setpulse(0.01);
If(!Getcurrentcamera()) Setthingcurgeomode(Bot, 0);
Else Setthingcurgeomode(Bot, 4);
Gh = Fireprojectile(Player, G, -1, -1, '0 0 0', '0 0 0', 0, 0, 0, 0);
If(Gh == -1) { Print("Lookvector ghost creation failure."); Stop; }
Setthinglook(Bot, Vectorset(Vectorx(Getthinglvec(Gh)), Vectory(Getthinglvec(Gh)), 0));
Setthinglook(Cam, Getthinglvec(Gh)); Destroything(Gh); Gh = -1;
If(Isthingcrouching(Player) == 1) {
If(!Fly) Setthingvel(Bot, Vectorscale(Vectorset(Vectorx(Getthinglvec(Bot)), Vectory(Getthinglvec(Bot)), 0), Ac));
Else Setthingvel(Bot, Vectorscale(Getthinglvec(Cam), Ac)); }
Else If(StopFall) Stopthing(Bot);

Stop;

Timer:
Setpulse(0);
Setcamerafocus(0, Player); Setcamerafocus(1, Player);
Destroything(Cam); Setwallcel(Switch, 0); Setthingcurgeomode(Bot, 4);
Clearactorflags(Player, 0x40000);
Stop;

Damaged:
Setpulse(0);
Killtimerex(0);
Setcamerafocus(0, Player); Setcamerafocus(1, Player);
Destroything(Cam); Setwallcel(Switch, 0);
Clearactorflags(Player, 0x40000);
Stop;
End


Quote:
<font face="Verdana, Arial" size="2">2. How do I make a BoxTurret look in random direction, then when a player activates it, player sees what turret sees and can turn its head around (left right on head, up down on pipes) and when I shoot, I can control this projectile and detonate with another shoot. Exit with secondary shoot.
</font>


Thats not possible in JK. Sorry. Youd need PlayerAction for that, which is sadly only in MotS.

------------------
The future is here, and all bets are off.
And when the moment is right, I'm gonna fly a kite.
2004-01-02, 2:40 PM #12
I wouldn't say its not possible, BAH Strike did it, but it's probably more trouble then its worth.

------------------
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
2004-01-02, 6:26 PM #13
Quote:
<font face="Verdana, Arial" size="2">Originally posted by SM_Sith_Lord:
I wouldn't say its not possible, BAH Strike did it, but it's probably more trouble then its worth.</font>


Ahh yes, BAH Strike.... To paraphrase Jipe,

Quote:
<font face="Verdana, Arial" size="2">We all know that BAH Strike has already made, thrice over, every single cog combination in existence, and once typing everything with only one hand, because he was fighting off the Russian Army with the other, which was only holding a pencil. And the pencil was broken. He can't release anything, or possibly be of any help at all, because of his top-secret contract with the US Government, which wants to use his cogs to destroy Canada..
</font>


Unless the code is posted and prooved publicly to work, it was never written. Coggers, and programmers in general, have a tendency to exaggerate their successes.. Take everything with a grain of salt, especially when its coming from a known JK hacker....

------------------
The future is here, and all bets are off.
And when the moment is right, I'm gonna fly a kite.
2004-01-02, 7:28 PM #14
Lol, you can go ahead and flame him if u want man, but I was the guy he would beta test all of his stuff with. Beleive me, he's made some awesome stuff... but i think he had ADD or something.

I looked at his cog and it was pretty much an uber fast pulse setting the YAW of a gun barrel to the YAW of the player. Seemed pretty simple to me, although there were some things that I didn't understand in his cog. He had a tendency to use var names that had NOTHING to do with ANYTHING, just look at cog used in Purgatory for the doors that protect the basement bunker, lol. Not sure if i revized it or not, but if i did i'm sure i left a note.

------------------
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
2004-01-03, 1:35 AM #15
Quote:
<font face="Verdana, Arial" size="2">Originally posted by GBK:
Take everything with a grain of salt, especially when its coming from a known JK hacker....
</font>


Some of the best MOD authors come from JK hacking background. ShadowX publicly admitted it. There are many others.

Unless you test alot of cogs in multiplayer its tough to figure out which cog verbs are local effect or global effect.
JKspecs or Datamaster dont tell you this information. I think the JKspecs tried to differeciate by using 'player' instead of 'thing' in many cases, but they were also wrong in many cases. I dont think JKspecs or Datamaster specifies what information is sync'd and not sync'd between computers.




------------------
- Wisdom is 99% experience, 1% knowledge. -
- Wisdom is 99% experience, 1% knowledge. -
2004-01-03, 4:23 AM #16
Didn't realize I had a reputation [http://forums.massassi.net/html/eek.gif]
2004-01-03, 4:39 AM #17
Anyway, the problem with GetThingLVec and using it on the player is that it's not literally a GetThingLookVector, or not the way most people would immediately assume. It operates on a much lower level, getting the PYR of the 3do itself, not filtering up through to the rendering engine, which obviously takes into account where the mouse is and draws the scene accordingly taking into account the mouse pitch, blah blah blah. Anyway, if you can figure out a way to disable an actor flag or somesuch that would allow not just the torso to tilt when the mouse pitch changes but the entire 3do (maybe one of those Unknown/Unused flags) then you're in luck and would have cracked a major mystery in JK Editing/Hacking.

But... otherwise you could do the traditional, and very inefficient, method of having the player fire a projectile (creatething does not take into account the player's mouse or aim pitch, fireprojectile does), then getting the lvec of that fired projectile
setthinglook(turret, getthinglvec(fireprojectile(blahblah)));
EAH missle hack shows this. It caused a hell of a lot of lag because of the foolish pulse rate, and because of that, there was a delay between setting the flags on the fired projectile for everybody.. soo, it was pretty buggy - BUT, as a level author, you can copy a pre-existing projectile template (if you are uncomfortable writing your own) and A) Making it invisible B) Making it phantom (no collide - sorry oldschool terms kicking in) and optional C) setting its velocity low (doubtful it would reduce lag but it does reduce error margin)

If you were me, and you aren't, but you can still take my advice: I'd set a cog on the projectile template to instantly get its own lookvector, and set the turret's lvec to that as well, before destroying itself. How could you get the turret object? Remember,
thing turret=53 local
is a perfectly valid syntax. Just be sure to update this number to whatever thing# the turret is!

Hope this steaming mass of goat dung of a post has been helpful. If not, ***** at me at none3@verizon.net and I'll do some hardcore experimentation and tweak this out and present it to you in a prettily wrapped package on a silver platter with top notch duck sauce on the side.

-Strike
2004-01-03, 4:50 AM #18
Well - I was curious and looked up Jipe's posts, and found it http://forums.massassi.net/html/Forum4/HTML/002664.html

Ahh yes, seifer.. *grits teeth* arrogant b'astard

[This message has been edited by BAH_Strike (edited January 03, 2004).]
2004-01-03, 6:14 AM #19
Even before BAH_Strike's last post, I remember Jipe's comment a couple of year's back because it made me laugh so hard, for so very long when I read it - and those were the days when I was lurking at Massassi [http://forums.massassi.net/html/wink.gif]

I hadn't even got to the bottom of the page when I thought "I'm sure GBK's paraphrasing of Jipe's original comment applied to Seifer - if memory serves me correct..." [http://forums.massassi.net/html/wink.gif] [http://forums.massassi.net/html/biggrin.gif]

There still is no denying it at the end of the day though - as "helpful" as Seifer may have been (in his time [http://forums.massassi.net/html/wink.gif]) he still knew his stuff (albeit in a "tad cocky" manner...) [http://forums.massassi.net/html/wink.gif]

The_New_Guy: The verbs for local and global are fairly self explanatory, but it's the "flags" setting at the top which is arguably more important - at the end of the day you can write cogs with global effects pretty easily - it's not good for performance on the other clients' machines, but it's one way of doing things.... Same thing with the synched/un-synched effects.

Not to mention, the whole point of the DataMaster is to provide you with information as to "what" the verbs are and the "effects" that occur, "when" you use them - they don't tell you "how" you should implement them, because that depends on the nature/purpose of the cog (and its author's intentions) - obviously these vary in every cog ever written (thank goodness for free-thinkers) [http://forums.massassi.net/html/smile.gif]

Well that's my tuppence worth of thoughts for the day [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

------------------
"lucky_jackpot is the smily god..." - gothicX

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2004-01-03, 11:11 AM #20
Can somebody tell me what Data Master is?

------------------
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
2004-01-03, 12:21 PM #21
I can't believe I used to use "w/" on forums...

------------------
Bassoon, n. A brazen instrument into which a fool blows out his brains.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2004-01-03, 1:09 PM #22
Thought I'd get in first before SaberMaster shamelessly plugs his work [http://forums.massassi.net/html/wink.gif]

I find it hard (though not impossible) to believe that we have so many talented editors and coggers that don't know where to download the DataMaster (aka the COG BIBLE [http://forums.massassi.net/html/biggrin.gif] )...

If you visit SaberMaster's site, you should find it avilable to download under the "Files" section:
http://www.geocities.com/sabersdomain/

In my humble opinion, if you intend to edit/learn COG scripting, both DataMaster and Parsec are invaluable (for information and debugging purposes respectively [http://forums.massassi.net/html/wink.gif] )

Hope this info has helped [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

------------------
"lucky_jackpot is the smily god..." - gothicX

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2004-01-03, 2:10 PM #23
LJ, you failed to mention CogPad.... [http://forums.massassi.net/html/wink.gif]

------------------
The future is here, and all bets are off.
And when the moment is right, I'm gonna fly a kite.
2004-01-03, 7:13 PM #24
lol, I have uhhh.... my cogs to use as reference...and my uh... my cogging knowledge. [http://forums.massassi.net/html/tongue.gif] SaberMaster is the god of cogging, only know two other people who even come close. Hideki (I should learn to remember how his name is spelled [http://forums.massassi.net/html/tongue.gif]) and GBK (wordpad is all you'll ever need, [http://forums.massassi.net/html/tongue.gif] maybe, you might want parsec and DM alot too [http://forums.massassi.net/html/wink.gif]). Maybe Hideki was alittle better overall, but I can say with confidence tho, I'm the best AI cogger around. /end ego inflamation

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

The 2 riddle!

[This message has been edited by Descent_pilot (edited January 03, 2004).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2004-01-03, 7:28 PM #25
...why are you "rating" peoples' skills...?

But what would I know, just ignore me...

------------------
Bassoon, n. A brazen instrument into which a fool blows out his brains.

[This message has been edited by Emon (edited January 03, 2004).]

[This message has been edited by Emon (edited January 03, 2004).]
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2004-01-03, 8:22 PM #26
...And I know everything about weapon coding, specifically the inner workings of the lightsaber.

Either way, what Emon said - why are you ranking people, DP?

------------------
Duel Zero : Released the beta. Probably the end of it. Not to worry though, I'm working on Randsaber, which is a lot better.
2004-01-03, 8:44 PM #27
You are the best at AI cogging Descent pilot? Dude, at one point in Attack on Theed, there is going to be two different types of ships flying around fighting each other, like shooting at each other and everything. You wouldn't happen to have any AI lying around that controls a ship flying around, would you?

------------------
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
2004-01-04, 3:16 AM #28
Sadly, I think I can see where this thread is going... [http://forums.massassi.net/html/rolleyes.gif] [http://forums.massassi.net/html/frown.gif]

I (and more than likely, so have most others) have seen this type of "comparison"/rating thing before - t'is a good thing to have a bit of competition within a community but not "competitive comparisons". It only ends up turning sour with elements of bad blood between very talented editors; it's something that our community doesn't need...

That aside, apologies GBK - I coudn't remember the IP address of your site off the top of my head for CogPad [http://forums.massassi.net/html/frown.gif] - but if you want me to put a plug in then, "CogPad's not bad and was written by our own humble moderator, GBK [http://forums.massassi.net/html/smile.gif]". Will that please you? [http://forums.massassi.net/html/wink.gif] [http://forums.massassi.net/html/tongue.gif]

-Jackpot

------------------
"lucky_jackpot is the smily god..." - gothicX

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2004-01-04, 8:27 AM #29
i hate to pull all your tails.. but i seem to rembers saying
Quote:
<font face="Verdana, Arial" size="2">
well for turret thing you can use the vectors of the player and trasferthem to the turret. for shotting.. i dunno, your could put the player in a 3do box and record the damaged flag from his wepons. but the secondary shot woudl be a problem...
</font>

but i prefer
Quote:
<font face="Verdana, Arial" size="2">
unless you remove one of the wepons and replace the turret with it.
</font>

and with as strike mentioned
thing turret=53 (i used it before now and he never told me, and actualy no one did so. yeh.) it would be a hellva lot easyer, but you could allways add a new trigger to a wepons, then send the trigger from the turret to change a int or bin and so make the wepon cog act entirely differently.
i think i'll code that up actualy, it would be fun to do something that is hardly seen.

i dunno, i just felt i heard some other sutch ideas somewhere. :P

also on the frount of cog'ers and hackers i used to hack.. so yea.

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

[This message has been edited by [SF]pjb (edited January 04, 2004).]
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2004-01-04, 11:19 AM #30
The only hacks I've ever made were to use while beta testing my levels, and i'm the best cogger in the universe. so :P

------------------
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
2004-01-04, 12:10 PM #31
If I understood right, GetThingLVec() doesn't get which way the thing is looking, but instead its PYR?
If that's right, dang. Scratch the idea of cam-guided missiles for me! (maybe...)

------------------
It's Peanut Butter Jelly Time!
/Banana starts dancing
May the mass times acceleration be with you.
2004-01-04, 4:41 PM #32
You can just do a fireprojectile of some ghost template of little consequence, then that template's lvec will be exactly how the player is looking, up to and including mouse pitch.

------------------
Duel Zero : Released the beta. Probably the end of it. Not to worry though, I'm working on Randsaber, which is a lot better.
2004-01-05, 5:15 AM #33
just incase your are to bored to cog, data master has the code for doing that..

------------------
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?

↑ Up to the top!