on irc, betel explained how to use typCreate, so i created a quick example of it for those who are struggling to wrap their heads around it,
http://paste.neurohack.com/view/Y4gEQ/
the first code you see i just an item with custom mass, (test 100) makes a 100 kg romv
put the code it a <globals> tag, and from the dbg console, run (test2 100 15) that wil make a weapon that does 100 hp of darkfire damage, syntax is pretty simple once you get started,
typCreate can accept a static unid eg (typCreate 0xf0000001 (cat (code blah blah or a dynamic unid eg (typCreate (typDynamicUNID "test2") (cat (code blah blah,
(typDynamicUNID "test2") can be called like any static unid, within the save it was created in. eg (objadditem gplayership (itmCreate (typDynamicUNID "test2") 1))
quick example of typCreate
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
Last edited by sdw195 on Mon Mar 19, 2012 3:53 am, edited 2 times in total.
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
- Ttech
- Fleet Admiral
- Posts: 2767
- Joined: Tue Nov 06, 2007 12:03 am
- Location: Traveling in the TARDIS
- Contact:
throw it on our new wiki -- http://wiki.neurohack.com/transcendence ... /typCreatesdw195 wrote:on irc, betel explained how to use typCreate, so i created a quick example of it for those who are struggling to wrap their heads around it,
http://paste.neurohack.com/view/Y4gEQ/
the first code you see i just an item with custom mass, (test 100) makes a 100 kg romv
put the code it a <globals> tag, and from the dbg console, run (test2 100 15) that wil make a weapon that does 100 hp of darkfire damage, syntax is pretty simple once you get started,
=D
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
added unid example
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"