50mm AT GUN brush/model _ROX, JV, HELP???

Post your scripting questions / solutions here

Moderator: Moderators

Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

50mm AT GUN brush/model _ROX, JV, HELP???

Post by Slyk »

Thought of _Rox and JV first, but I've got this brush worked model of a 50mm AT gun and turned it into a script_object. . . but, alas, I'm an idiot about how to get it to fire. IS that possible? Doesn't have to have any real left/right and up/down movement, just produce a fired shell, smoke/flash and sound. Hoping someone can tell me what is involved. Don't 'need' it to work, but would be cool....having Russians shooting Panzer with 88s just doesn't do it for me...........

Guess you could pretend that the 88s are actually Russian 85s and build a new base for them..hmmmmmm

http://www.contacthelpline.org/images/50mmatgun1.jpg - (image too big - fix it - Surg)

Image
SNap007be
Sergeant
Posts: 57
Joined: Sun Apr 27, 2003 12:55 pm

Post by SNap007be »

crate this model in a 3D Program, not just from brushes, then compare it to another SH one and copy and modify the properties.
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

I based it loosely on the nebelwerfer model...same height, axle width etc. Guess that would be the closest thing to model it too, but I'm not up on doing any moddeling with other programs. Just wondering if somehow a trigger can work the thing with scripting. Would you set up a new .tik file and then add emitter entities for the smoke/flash origins, etc. AND, if so, how????????
SNap007be
Sergeant
Posts: 57
Joined: Sun Apr 27, 2003 12:55 pm

Post by SNap007be »

Sorry, dunno like this, suggest you start studying MS and 3DMax, for the future.
Yarik
General
Posts: 1031
Joined: Thu Jan 09, 2003 7:12 pm
Contact:

Post by Yarik »

So far the only thing you CAN do is import and export as a MOHAA model. You cant really do anything with it as far as muzzle or flashes go or animations for that matter. I suggest you go to http://www.discreet.com/products/gmax/game_request.html
Vote and fill out the form. If a lot of people do it then they will release a game pack wich will include plugins so you will be able to do everything from animations muzzle flash smoke etc etc....
Skype: Yarik_usa
www.skype.com <---free pc2pc phone
Image
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

I was thinking that there was a thread a few months ago about some sort of emitter that would fire like a gun. If that IS true, then it seem like I might be able to use some sort of lever with a trigger that would 'fire' a script to create the illusion of a cannon firing.........or maybe not. Have to check that out and do some digging. Not too interested in any animations right now...how I figured it, I would just put this guns in stationary locations with very narrow fields of view, basically where they would ambush a tank and have no option to move left/right.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Probably you could just spawn a projectile and send it forward :)

Example:

Code: Select all

at50fire:
  local.shell = spawn projectile
  local.shell addvelocity ($at50.forwardvector * 128)
  local.shell dlight 0.8 0.6 0.5 // emit light
  local.shell dmlife 2 // don't fly for more than 2 secs
  local.shell explodeontouch
  local.shell explosionmodel "emitters/mortar_dirt.tik"
  local.shell hitdamage 10000 // a lot
  local.shell impactmarkshader "blastmark"
  local.shell meansofdeath explosion
  local.shell smashthroughglass 0
end
Possibly you have to set angles and speed instead of using addvelocity. In the example I assumed a at50 targetname of $at50.
Image
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

And to get those smoke stuff that come out from the barrel, as well as the rockets flying, read my nebelwerfer tut.
Live to map, not map to live.
-mohaa_rox, .map
moderator
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

Thanks JV, _Rox........ I'll try that right away and see what I get. I was pretty sure most of it could be done with scripting, just how much and WHAT. Guessing that I could add a 'gravity' to the projectile also, right? I'll try to get a firing lever to work also for a visual cue.

Huge thanks guys! Hope I can work it out.
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

Ok, have my trigger and switch working that gives the user a lever to pull to fire the gun. EXCEPT the gun doesn't produce the 'shell' per the JV script suggestion. I'm sure it's me because I am totally unsure of what type of 'emitter/script_object/etc' thing to use to produce the shell. I assumed I could put an emitter in just in front of the gun muzzle and have the script create the effect from that point. Any ideas?
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

You don't need an emitter, it should be possible to spawn a projectile anywhere.
Image
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

Ok, but 'what' spawns the projectile? If not an entity, then I'm guessing that I need to add coordinates for the location, right? My other design experience (different engine) always was based on using an entity to spawn an object.

Sorry to be so dense in this area, learning a lot though.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes you need to define an origin key as well. Guess I forgot that in my example :oops:
Image
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

Got my lever working that 'fires' the gun sound which is cool. Can't get the 'reload' alias to work though. BUT, biggest issue is still can't get the origin to spawn anything. Maybe I'm wrong, but this is what I did:

script_orgin-- key: $targetname value: shell

then used your (JVs) script above. No spawn of anything...IDEAS??
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

u need to define what local.shell is. For example:

local.shell = $shell.origin
Live to map, not map to live.
-mohaa_rox, .map
moderator
Post Reply