PDA

View Full Version : Holy code batman!!



legacy-Dark_Spectre
07-20-2003, 03:54 AM
I've been looking at the script for weapons and vehicles for the last couple hours. Needless to say my mind has converted into a quivering mass of runny pink jelly by now. :bulb: Are there any really good weapon scripting tutorials (or scripting in general) that I could look at? I already grasp the basics of syntax and such (I know C++ already), but I need some of the features and classes of weapon and vehicle specific scripting outlined for me. It's fairly overwhelming trying to figure out what classes do what functions.

Note to game programmers: code comments are your friend :mad:

legacy-jarnotjuh
07-20-2003, 06:46 AM
yeah, there are some:

i have found 1

its from angel_mapper...

http://www.unrealops.com/modules.php?op=modload&name=Reviews&file=index&req=showcontent&id=30


cya!

legacy-Dark_Spectre
07-20-2003, 06:59 AM
I've already seen hers. It's good, but I really need some more in-depth info. :sour: I guess this is no more complicated than any other game code, but the syntax of a lot of it is throwing me because I'm so used to C++.

For those of you that are proficient modders, just how long did it take you to learn this language? Because I have exactly three months to learn it and write the code for my mod. :eek: At least I have the benefit of knowing Maya, Photoshop, SoundForge, and all that good stuff already. It's only the scripting that's giving me brain cramps.

legacy-Spin
07-20-2003, 07:12 AM
I know just how you feel :D

I find that the best thing to do is to have a copy of the ut2003 2225 source in another dir to refer to and just use trial, error and sheer bloodymindedness :D

legacy-BabyNuke
07-20-2003, 07:20 AM
Spin's approach ;)

There was this really good coding side for UT1 (chimeric or something) - which helped me make my first (and ONLY ;)) mutator (a flak cannon that fired rockets, hurray!). I find coding a sure way to get headackes, so it ain't for me :( Don't have a link for ya, sorry :(

legacy-Dark_Spectre
07-20-2003, 07:21 AM
Originally posted by Spin
I know just how you feel :D

I find that the best thing to do is to have a copy of the ut2003 2225 source in another dir to refer to and just use trial, error and sheer bloodymindedness :D


The unstoppable persistence, I have. However I still need a starting point, I don't have craploads of time to toy around with it (there's a contest on, you know). Okay, here are a couple questions I have:

How do you tell the weapon effect where to spawn from? Is it related in any way to the muzzle flash that's attached to the front bone of the weapon?

How do you tell the game to draw a decal (projector, whatever...) where your weapon hits?

These are two points of the weapons that I really haven't been able to figure out yet. I won't even venture into Karma and vehicles right now. :bulb: My hovertanks and mechs will have to wait...

legacy-Spin
07-20-2003, 07:29 AM
function SpawnBeamEffect(Vector Start, Rotator Dir, Vector HitLocation, Vector HitNormal, int ReflectNum)
{
Spawn(Class'YourHitEffect',,, HitLocation, Rotator(-HitNormal));
}


I do that in my fire class, spawnbeameffect is where the projectile (or in my case, instantfire extension) causes a hit effect to be spawned..Class'YourHitEffect' is the class that spawns the effect you want, I have a selection of emitters that spawn according to the surface type at HitLocation.

Hope that is of assistance :) I freely admit to being a total n00b with unrealscript and what I've achieved has been through the trial and error method.

If you want to spawn a decal there, take a look at the assault grenade and how that works (thats where I found it)

legacy-Mr Evil
07-20-2003, 07:59 AM
There is another weapon tutorial here: http://www.cheese83.freeserve.co.uk/unreal/tutorials/weapontut.htm
It has taken me since UT2003 came out to learn virtually all I know of UScript. I started, like you, knowing C++ first. To learn, I spent lots of time reading the UDN, the Wiki and most of all, the source code.

legacy-Dark_Spectre
07-20-2003, 08:38 AM
That is EXACTLY what I needed, thank you Mr Evil. In the past two hours I've found the two best tutorials (including this one) for what I need. I'm so happy!! *does a happy dance* :eek: *wakes up wife* :confused: Uh oh....


You people are going to get one hell of a Total Conversion when I get all of the details nailed down. Thanks for the help. :D

legacy-(A7)Merlyn
07-24-2003, 06:54 PM
Oh, and one other thing, Dark Spec... I haven't checked it out since I know Scripting ain't my slice of pie, but if you go to www.masteringunreal.com 3dBuzz has made some Unreal Tournament 2003 Tutorials on many things including scripting and weapon making...

Maybe the will help? :rolleyes:

legacy-5E4N
07-24-2003, 07:12 PM
I've noticed Wiki has some scripting tutorials, though I haven't gotten into them yet. Anyhow, I thought I'd add to what's been given -

.../wiki/Weapon_Mutator_Tutorial (http://wiki.beyondunreal.com/wiki/Weapon_Mutator_Tutorial)

http://wiki.beyondunreal.com/wiki/UnrealScript_Lessons

legacy-Dark_Spectre
07-24-2003, 07:58 PM
What I actually needed was a definitive guide, but I'm figuring it out very quickly.