Data Realms Fan Forums
http://45.55.195.193/

A few coding questions
http://45.55.195.193/viewtopic.php?f=1&t=16523
Page 1 of 1

Author:  Hakazaba [ Mon Sep 14, 2009 1:15 am ]
Post subject:  A few coding questions

Basically i have made a modifyed drone that i want to give weapons to ingame
i can give it a turreted weapon but not a changable one.

I have a rough idea on how to code this now but i have a couple of problems:

How do i define that an actor has an inventory?

What lets them pick up and use weapons?

Can they i turrets or do i have to use arms?

Can an ACrab not use arms? (crash that i cant seem to solve)

Hhow do i chage the aiming angle? At the moment i cant look up or down, i changed the Aimangle to 360 but that had little effect. i would be fine with it but evan if the drone falls over the turret is still consrained to the same angles.

(unfortunatly i cannot upload it right now, maybe tomorrow)

Oh yeah, im new but i allready have spriting and coding experiance.

So... Hi! :hat:

Author:  Duh102 [ Mon Sep 14, 2009 2:00 am ]
Post subject:  Re: A few coding questions

I don't know the variable for how far up and down an ACrab can aim, but there is a variable for it.
ACrabs can only have one weapon, no arms, four legs. Once the turret is shot off, it's pretty much useless.
Actors can have many weapons, two arms, two legs. Once the main hand is shot off, it's pretty much useless, though you can jetpack into stuff and potentially use the offhand weapon you already had.

Author:  Grif [ Mon Sep 14, 2009 2:05 am ]
Post subject:  Re: A few coding questions

AimRange is the variable.

And it's more correctly AHumans and ACrabs, Actor is a nonspecific parent class (see: brain) that's typically limbless.

Author:  Duh102 [ Mon Sep 14, 2009 2:08 am ]
Post subject:  Re: A few coding questions

Whoops, meant to type that. AHumans, as Grif said.

Author:  Hakazaba [ Mon Sep 14, 2009 2:29 am ]
Post subject:  Re: A few coding questions

I guess that means i have to make specialized drones. Oh well, that will be fun anyway.

Thanks for replying. :grin:

Uh... what is the unit for AimRange, is it degrees? would setting it to 180 give me full rotation?

Also, what kind of things can you put into the jump thing?, i'm thinking grappling hook.

Author:  Duh102 [ Mon Sep 14, 2009 3:27 am ]
Post subject:  Re: A few coding questions

There's both radians and degrees strewn about ini scripting, though I'd imagine it's degrees on both sides of the horizontal. You can always try 3.14 and see if it's horribly small.

Author:  Grif [ Mon Sep 14, 2009 4:12 am ]
Post subject:  Re: A few coding questions

AimRange is in radians, with 0 being no aim (strictly horizontal). It's also aligned to the world, not the unit in question.

Deleting it entirely should give you entirely free aiming, as well.

Author:  numgun [ Mon Sep 14, 2009 7:57 am ]
Post subject:  Re: A few coding questions

Grif wrote:
AimRange is in radians, with 0 being no aim (strictly horizontal). It's also aligned to the world, not the unit in question.

Deleting it entirely should give you entirely free aiming, as well.


And setting it over 1.0 will make you aim past the directly down and directly up limits. The ronin Mia has this.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/