Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - boodals 2

Pages: 1 ... 15 16 17 18 19 [20] 21 22 23 24 25 ... 66
286
Modification Help / Re: Get player's equipped item slot to define %slot
« on: August 31, 2014, 04:57:31 PM »
%slot here isn't the slot of the item in the GUI, it's the slot the image is mounted in on the player, 0 to 3. In general, items are mounted in slot 0.

You don't need to do %obj.tool[%slot].image to get the image, it's just %this.


I recommend that you just copy the ammo from the image without iron sights and put it on the iron sights one when you go into it, and copy it back when you're done.

Actually, now I look at it again, that seems to be what you're trying to do...

287
Modification Help / Re: Mounting Images on Selection
« on: August 31, 2014, 02:04:49 PM »
The function the event is trying to call is AIPlayer::setPetType(%bot, %image, %client).

Wouldn't Player work anyway because AIPlayer inherits from Player?

288
Modification Help / Re: Boodals' Untitled D&D-like RPG
« on: August 30, 2014, 08:35:49 PM »
Updates on the inventory GUI



And a new GUI that i'm working on. Its sorta like a quick-select tool. Expect Siba to make it look better, we're thinking of making the slots round.


Click the gif and click "MP4" to see it in higher fps.

289
Modification Help / Re: Boodals' Untitled D&D-like RPG
« on: August 28, 2014, 12:29:49 PM »
This looks lovey, especially that GUI. Keep up the good work. Also....


The forget are these rock bricks? must have.

They're originally from Elm's Land of Blocks. They've been stolen and released a few times, do some searching.

290
Modification Help / Re: Can't get a part of a code to work
« on: August 25, 2014, 02:30:31 PM »
I think simply putting a return; after %client.chatMessage("Player not found"); , deleting the next else, then deleting everything indented from and including else if(isObject(%client.player)) (lines 24 to 33) should fix it, although it can be done a lot neater and more efficiently.

Someone explain return because there's no sign that he understands it. I would but I can't word it nicely.

Also, wow, I've never seen a Coding Help topic so busy..

291
Modification Help / Re: Can't get a part of a code to work
« on: August 25, 2014, 02:07:54 PM »
Ah. So do assignment statements return the assigned value? (in this case findClientByName(%name))
Yes.

You can't do a bracketless else statement to encapsulate more than one statement. It'll only cover the next statement. You should probably add the brackets to all your elses, I bet that's causing some errors.
Actually, the brackets are fine, its his indentation which is wrong. No matter whether %target is the same as %client, the score should be increased.

Edit: Actually, there are cases where the else statements should be bracketed. I only saw the case on line 16.

292
Modification Help / Re: file i/o & escape character butt
« on: August 24, 2014, 10:45:09 PM »

293
Off Topic / Re: I saw RTB being up today
« on: August 22, 2014, 06:29:48 PM »
Yeah this happened a couple of months ago. Ephi booted up the servers to for something, everyone went mad thinking RTB was coming back, then he posted explaining that he forgot to shut it down.

294
Modification Help / Re: A better collaboration tool than Titanpad
« on: August 20, 2014, 07:45:42 PM »
I've been messing around with this for a while now, it feels a bit finicky in Sublime text. I don't like how you have to reconnect each time you start it up. Maybe there's a way to do just that hidden away somewhere.

One big down side is that you don't get any private work spaces for free, you have to pay monthly, or use a 2 week trial. Other than that its pretty good.


Oh, and the in-browser text editor is surprisingly good. Supports multiple cursors, which is better than most text editors.

295
Modification Help / Re: Understanding Default Gun Code
« on: August 20, 2014, 07:22:17 PM »
It would be measured in "Torque Units" which are equal to 2 (I believe) or 4 (maybe) studs

1 torque unit is equal to 2 studs.

A 1x1 plate is 0.5x0.5x0.2 torque units.

296
Modification Help / Re: Boodals' Untitled RPG
« on: August 20, 2014, 02:22:17 PM »
I don't have a computer available right now, do you have a dedicated server? If so, I'll try to start work as soon as possible. I'll replicate everything on the topic in my own tastes and show you since I'm unsure as to what you want.

I don't have a dedi, I just host when I'm in the mood to code. Ill host now for a few hours.

297
General Discussion / Re: Anyone need a builder?
« on: August 20, 2014, 12:52:13 PM »
You can always build stuff for my RPG.

298
Modification Help / Re: A better collaboration tool than Titanpad
« on: August 20, 2014, 09:26:52 AM »
Holy stuff that's exactly what I've been looking for for like a month.

299
Modification Help / Re: Boodals' Untitled RPG
« on: August 19, 2014, 08:21:21 PM »
Oh hey the topic isn't as dead as I thought.

Last time I was on, it seemed the inventory scripts and GUI were going along swimmingly...

Also, a quick question, what happened to the server? You taking a break from this project, or just not coding openly any more? It was rather interesting seeing progress being made.
The inventory stuff is going very nicely, mainly thanks to Siba for doing all the client sided stuff.

I host the server pretty much every day, and have done for the last few weeks. The time its up varies a lot though.


I see you're content with your current built objects, but if you want, I can build a bunch of default stuff all in a similiar style if you want your mod to take a more professional approach. I'd love to help and I see a lot of potential in this.

Sure, come by the server sometime, or send me a save file, whatever suits you.


Here's a teaser of the Inventory GUI that Siba is making:

300
Modification Help / Re: Correct movement while aiming for AIPlayers
« on: August 18, 2014, 04:23:31 PM »
This is what I'm using. This is in a schedule loop on an AIConnection who's control object is a Bot.

Code: [Select]

//Moving
%moveVec = vectorSub(%movePos, %pos);

%moveY = vectorComponent(%moveVec, %forVec);
%moveX = vectorComponent(%moveVec, vectorCross(%forVec, "0 0 1"));

if(vectorLen(%moveX SPC %moveY) > 1) {
%move = vectorNormalize(%moveX SPC %moveY);
%moveX = getWord(%move, 0);
%moveY = getWord(%move, 1);
}

%client.setMove("y", %moveY);
%client.setMove("x", %moveX);



//Looking
%lookVec = vectorNormalize(vectorSub(%lookPos, %eyePoint));

%yaw = mATan(getWord(%lookVec, 0), getWord(%lookVec, 1));
%pitch = mASin(getWord(%lookVec, 2));// - 0.15; // - 0.15 makes the bot look down slightly, to mimic players, however it makes it inaccurate.

%facingDir = mATan(getWord(%forVec, 0), getWord(%forVec, 1));

%yaw -= %facingDir;
%pitch -= mASin(getWord(%eyeVec, 2));

if(%yaw > $pi)
%yaw -= 2*$pi;
if(%yaw < -$pi)
%yaw += 2*$pi;

%yaw = mClampF(%yaw/5, -$pi/30, $pi/30); //These just limit the turn rate of the bot.
%pitch = mClampF(%pitch/5, -$pi/30, $pi/30);

%client.setMove("yaw", %yaw);
%client.setMove("pitch", -%pitch);




function vectorComponent(%vec1, %vec2) { //Returns the component/projection of vec1 in the direction of vec2
return vectorDot(%vec1, vectorNormalize(%vec2));
}

%movePos is the position to move to, %lookPos is the point to look at. Everything else should be self-explanatory.


Edit: Added in code for looking at a position.

Pages: 1 ... 15 16 17 18 19 [20] 21 22 23 24 25 ... 66