c++ in unreal script

Discussions about Coding and Scripting
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

c++ in unreal script

Post by UT Sniper (SJA94) »

noob question

I was thinking when i was coding for unreal develpment kit before my good pc died, you could use c++ within a unreal script
So can u use c++ in unreal scripts for ut.
And if so How do you start it off
in UDK its like this;

Code: Select all

cpptext
{
INT Encompasses(FVector point);
	void SetVolumes();

}
But UT doesnt understand the cpptext {
code}
:help:
User avatar
anth
Adept
Posts: 257
Joined: Thu May 13, 2010 2:23 am

Re: c++ in unreal script

Post by anth »

In UE2 and later you can use cpptext blocks to inline code in the headers that will be created from the .uc file. These headers can then be included in your dlls code. UE1 does not support cpptext and you would need to rewrite a part of the UScript compiler to make it possible.
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: c++ in unreal script(Help)

Post by UT Sniper (SJA94) »

@anth

thanks for the input :thuup: , i will have a go at the dll way then at least i got the tools to do that. I am starting to miss ue3 a lot now its a lot better but the games don't have the same great look like ut99.

Edit2
How do you get the dll files to work with unreal ed
Last edited by UT Sniper (SJA94) on Tue Jun 14, 2011 7:30 pm, edited 1 time in total.
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: c++ in unreal script

Post by UT Sniper (SJA94) »

:help: :help:

Does anyone know how to use dlls with unreal ed im thinking off making a version of unreal kisment but not sure of how you use dlls with unreal script\Unreal ed. I can link dlls to my own applications but not ued sorry 4 double post
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany
Contact:

Re: c++ in unreal script

Post by Shadow »

The process of combining unreal script together with c++ is a complex one. The tutorials for c++/uc coding are really rare. First of you need a good c++ compiler or better a good c++ development environment (Visual Studio for example). I recommend you start off with looking for related tutorials, since I can't find any proper tutorial right now. But I will look on my external hdd...

Well so you want to implement kismet in UED 2? Have you asked yourself how? You know nothing about UED's program structure without complete source code, the public source doesn't contain any ued code snippets. I doubt it will be possible to implement such a feature directly into UED. Also keep in mind, that although both being very similar programing languages, c++ differs not only in some style aspects but more in depth and complexity. I recommend you start off learning on how to glue unreal script and c++ together, then we speak further..

Have you ever programed with c++ in the past? How good are your general / unreal script coding skills?
Image
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: c++ in unreal script

Post by UT Sniper (SJA94) »

Thanks for your time shadow yes i have some experiance in c++ i have made some command line applications including converters, basic text editors. and was making an unreal script editor but was useing Devc++ wich is really only good with command line so i cancled the project. But a few days ago i got visual studio and in a few days learned dLL export funnctions and now i making a converter(eg Mile to kilometer ect) program with dlls to get better understanding dll functions, then im going to learn more about GUI funnctions ect, and i am hoping to get an apprenticeship with a IT company later this year. I have been getting more knowlage of unrea script as well(made a few weapon mutators changing killingspree funnctions ect).
I think i should spend a while longer to get an advanced understanding off c++ as well as unreal script by the sounds of things, and maybe start off with a smaller project first before doing somethink big.

i will have a search of stuff for glueing uscript and c++ together.

thanks for the advice :thuup:

edit 1:
just downloaded some source code for unreal tournament so im going to have a look at how it all works.

edit 2:
the source code and stuff has a great little bit on the basic tasks requiered to glue c++ unreal together it helped a lot but just have to work 1 thing out and i will be able to use dlls/c++ :mrgreen:

edit 3:
I have my dll running and working in unreal ed all i have to do is make a project that does somethink good. im planning to make somethink small first.
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany
Contact:

Re: c++ in unreal script

Post by Shadow »

I finally found that little tutorial I mentioned lately. It still leaves many questions unanswered, but it shows to most basic way based on a simple DLL-test package.

Note: In some cases it's not possible anymore to program with Visual Studio C++ 6.0 and one may need a newer version (I'm using 2008 Express, works fine for me) of it together with adapted UT 432 Public Headers.

Here's the >>tutorial<<

How's your project going?
Image
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: c++ in unreal script

Post by UT Sniper (SJA94) »

@ Shadow
great thanks for the link :gj: i use visual 2010 it should be ok i think

project is slow at moment due to revision and test + job interview now most of thats past so i should have some more spare time.
im still thinks of somethink to start out might try a volume builder like Ut3

i don't really trust that download site i got the download but i had 2 malware virus alerts last time i went on that site :shock: none this time tho must of been a 1 off

EDIT1;
i take it that the 432 source code will not work with 436 at all, i need to do it all again i think i went wrong somwhere in the tut loads of errors :omfg: i have a go again in a bit i think took me a while to get my first applications to run fine if only my pc didnt suck i would of made a lot of stuff for my game on udk now i know c++
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany
Contact:

Re: c++ in unreal script

Post by Shadow »

My downloads are save, really.

Oh VS 2010.. that's good.

Well there're no other public sources than the 432 one, but they do work. Except for deeper programming , in some cases special configurations of the current VS C++ project were necessary and a modified 432 public source, but I don't know who posted this issue I myself came across it during base render programming
Image
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: c++ in unreal script

Post by UT Sniper (SJA94) »

I think i made a little error when i tryed my first attempt at the dll(simple mistake) i will try again soon plus i will keep an eye out for a copy of ut99 432 or just get a patch for my copy i have now. thanks for your input :tu:
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany
Contact:

Re: c++ in unreal script

Post by Shadow »

Oh I found these adapted 432 public headers in my UT Dev files (those which work better with newer VS versions), if want or need them I may upload them for you (just 600 kb)
Image
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: c++ in unreal script

Post by UT Sniper (SJA94) »

Sounds good i think i might need them. still havnt got it to work yet in visual that tut was a great help for setting everythink up project and visual i just need to change a setting i think then it should work from now on.

thanks for the help :tu:
User avatar
Creavion
Godlike
Posts: 4497
Joined: Sun Feb 17, 2008 7:23 pm
Personal rank: About to be non-act.
Location: Germany, Lower Saxony

Re: c++ in unreal script

Post by Creavion »

About to be non-active
My very last UT map project: CTF-FacePalm (tropical CTF-Face remake)
Why do I leave? click here
What I want to do next: Joining an UDK team (uncertain however) and improve 3D modelling and texture editing skills
Thanks to those who visibly supported me until/at the end!
My reactivated account on indiedb.com.
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: c++ in unreal script

Post by UT Sniper (SJA94) »

@Creavion
Thanks for the links but i already have the 432 source code at least if anyone else is looking for it here they can find. :gj:
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: c++ in unreal script

Post by UT Sniper (SJA94) »

I thoght i should share this link as well, if any 1 else is into native coding.

[url]hxxp://www.freewebs.com/cppsdks/[/url]

lol i don't know if im being stupid but i can't find the Preprocessor category on my visual studio 2010. :oops:
Post Reply