Author Topic: setAimLocation  (Read 4874 times)


Cool. Can anyone forsee in-game scripted cinematic stuff being made? I know I want to :D

Yes, for example, if you wanted to make a player move in a circle along the x-y plane:
Code: [Select]
function Player::circle(%player, %radius, %degrees_per_second) {
        if( %radius $= "" ) %radius = 1;
        if( %degrees_per_second $= "" ) %degrees_per_second = 120;

%pos = %player.getPosition();
%x = firstWord(%pos);
%y = getWord(%pos, 1);
%z = getWord(%pos, 2);

for(%i = 1; %i <= 360; %i++) {
%rad = %i * 0.01745329251994; // Pi / 180
%new_x = (%x * mCos(%rad)) - (%y * mSin(%rad));
%new_y = (%y * mCos(%rad)) + (%x * mSin(%rad));
%new_z = %z;
%new_pos = (%new_x) SPC (%new_y) SPC (%new_z);

%player.schedule(%i * 1000 / %degrees_per_second, "setTransform", %new_pos);
}
}
Variables are for size of circle and speed.
« Last Edit: March 13, 2008, 07:02:43 PM by exidyne »

all of this is C++, you prob mean binary.  But you can just take the aiplayer from v0002 and change it to look like this.
Code: [Select]
1010000101010101001010101010101000101110110001010010010110
0100010111011000101001001011001000101110110001010010010110
0101011010100010100010000111101010110101000010010101010101
0100010111011000101001001011001010110101000101000100001111
0101011010100010100010000111110100001010101010010101010101
0101011010100001001010101010101010110101000010010101010101
1010000101010101001010101010101010110101000101000100001111
0100010111011000101001001011010100001010101010010101010101
0101011010100010100010000111101010110101000101000100001111
0100010111011000101001001011010100001010101010010101010101
0101011010100010100010000111101010110101000010010101010101
0101011010100001001010101010101010110101000101000100001111
1010000101010101001010101010110100001010101010010101010101
0100010111011000101001001011001010110101000010010101010101

Yes.  He means binary.

Tri

If not Hex.  Cuz the .dso looks more like Hex.

Yes, for example, if you wanted to make a player move in a circle along the x-y plane:
Code: [Select]
function Player::circle(%player, %radius, %degrees_per_second) {
        if( %radius $= "" ) %radius = 1;
        if( %degrees_per_second $= "" ) %degrees_per_second = 120;

%pos = %player.getPosition();
%x = firstWord(%pos);
%y = getWord(%pos, 1);
%z = getWord(%pos, 2);

for(%i = 1; %i <= 360; %i++) {
%rad = %i * 0.01745329251994; // Pi / 180
%new_x = (%x * mCos(%rad)) - (%y * mSin(%rad));
%new_y = (%y * mCos(%rad)) + (%x * mSin(%rad));
%new_z = %z;
%new_pos = (%new_x) SPC (%new_y) SPC (%new_z);

%player.schedule(%i * 1000 / %degrees_per_second, "setTransform", %new_pos);
}
}
Variables are for size of circle and speed.
Multiple schedules at once are very laggy, and it won't show any sort of walking animation.


Who said YOU could come back?


Hahaha. Your first post back after your little tantrum and you still manage to make yourself look like an idiot.

DSO isn't binary you cretin, its just encrypted. And Hexadecimal's sole use isn't color coding. Its just another way of storing numbers.

I am not back, plus it wasn't my first post.

Well you clearly are because you're posting.

DSO is the .cs file encrypted as ephi said.

the program converts the C++/Torquescript to binary to read it

(took me 3 trys to post this)

Instead of declaring something like you know what you're talking about, maybe you should have replied with "I'm in a bit of a pickle.".  It would have been much more appropriate to your level of knowledge on the topic at hand.

I was checking up on Blockland and felt like saying something.

Thank you for correcting me by the way.

I'd also like to say I know alot more about the world of coding since I left.