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 - H3

Pages: [1] 2
1
Modification Help / Re: Ark - RPG
« on: July 29, 2015, 09:22:39 AM »
Shop is now 100% functional. Will be moving on to redoing map and revamping buggy AI code.


2
Modification Help / Re: Warble's 4wd Tercel Project (its back)
« on: July 04, 2015, 05:44:52 AM »
About the blurred license plate: Anybody with Photoshop can untwist those blurs (given the right brush size) to reveal the plate numbers. If the image is yours, you should probably make it harder..

3
return; // not exactly sure what this does, but it might just be an end statement???
The return; statement stops the code from running, whilst allowing the function to return data.

When you call a statement such as this:
%target = findclientbyname(%name);

What you first need to know is that findclientbyname itself, is a function. If I were to guess what the code looked like, it would look like this:
Code: [Select]
function findClientByName(%name)
{
for(%a=0;%a<ClientGroup.getCount();%a++)
{
%b = ClientGroup.getObject(%a);
if(strStr(%b.name, %name) >= 0)
return %b;
}

return false;
}
Disclaimer: I'm not sure if findClientByName is at all written in torque script - it might be written in the c++ side of the engine.

When you use return, you can also attach any/some sort of data (usually boolean) to return with it. Here are some samples of returning data:
Code: [Select]
return; // returns nothing, used to terminate the current code being ran.
return true;
return false;
return 100-50;
return %a-%b+c;
return %string;
return %word1 SPC %word2 SPC %word3;
return strLen("THIS IS A STRING");

Now back to the %target = findclientbyname(%name); line. %target is a variable that will now hold the value of what the function (findClientByName) had returned. In this case, it's the client object that the player is connected to.


The return statement is widely used upon all (I think) programming. In torque script you can use it to your own use like:

Code: [Select]
function minus(%a, %b)
{
return %a - %b;
}

function main()
{
%blah = 9;
%what = 5;
%result = minus(%blah, %what);

echo(%result);
// '4' is what should be echo'd in console.
}

And a little further advanced, you can use return in a recursive manner to create another kind of loop:
Code: [Select]
function getOneHundred(%count)
{
if(getRandom(0, 100) != 100)
return %count;
else
return getOneHundred(%count+1);
}
This will run (infinitely) until getRandom(min, max); generates '100' as a random number. In the event that it doesn't generate '100', it will call itself again to generate it (thus again.. infinitely). Also, while it's doing that, I'm making it pass an argument of %count to keep track of how many times it is calling itself. That way I can see how many attempts it needs for it to roll '100'.


I probably forgot to cover some other stuff. If anyone else has anything to add on, feel free to do so.

4
Modification Help / Re: Cancelling schedules
« on: June 29, 2015, 09:53:47 PM »
cancel already checks to see if the specified event exists (and doesn't have any side effects otherwise), so the isEventPending check is redundant.
Ahh thanks, I'll edit my code above.

5
Modification Help / Re: Cancelling schedules
« on: June 29, 2015, 09:07:46 PM »
Is there a function to cancel a schedule? I tried running cancel("function"); and cancel($Package::Schedule); but neither do the trick. I have 10 schedules on a loop and I have no idea how to cancel one before starting another.
cancel($Package::Schedule); is correct syntax. You must be wrongly defining the variable as the schedule.

Do so like such:
$MySchedule = schedule(10000, 0, doThisFunction);
cancel($MySchedule);

Best method of managing a loop that schedules itself is such as this:
Code: [Select]
function doLoop()
{
cancel($MySchedule);

// DO STUFF

$MySchedule = schedule(1000, 0, doLoop);
}

6
Modification Help / Re: How to make a weapon automatic?
« on: June 29, 2015, 01:31:56 AM »
In the guns shapeBaseImageData(block), configure the guns image states to how you desire. If you get stuck, look at the image states of another automatic weapon for an example.

7
Modification Help / Re: Ark - RPG
« on: June 28, 2015, 09:27:20 PM »
as in 1-10.
Playable version is probably at a 4. Release is probably at a 1 or 2.

8
Modification Help / Re: Ark - RPG
« on: June 28, 2015, 09:31:53 AM »
Me too, when I first saw it. But this is interesting, enough.

PS: Any good progress?
On a scale of 1-10, how done are you?
Done as in.. alpha/beta/release stage?

9
Modification Help / Re: Ark - RPG
« on: June 25, 2015, 09:42:34 PM »
uh maybe u can put some kind of fight music when you go into battle
OOOoo I like the idea.

10
Modification Help / Re: Ark - RPG
« on: June 25, 2015, 01:17:44 AM »

11
Nodes are simply each 'thing' that is exported in a DTS file. So, each individual object and armature/joint/bone is a node. If you have no nodes, you have no object.
Ahh, I see. I'll try adding joints to my objects.

12
Modification Help / Re: Texture Help
« on: June 24, 2015, 10:54:45 AM »
So far blockland has zero support for textured image files.

All models render on solid colors in the form of small, cubic .png files

Check Weapon_Gun. You need to arrange colors in the format of the ones found there. The size of the .png isn't actually important, but it is suggested you use a 1x1 pixel to represent the color.
False.

13
Modification Help / Re: Ark - RPG
« on: June 22, 2015, 11:52:28 AM »
Can you put the way the character is told when he levels up in here: https://www.youtube.com/watch?v=BTRgNs5W1kc
Into your rpg?
I definitely could!

14
Modification Help / Re: Ark - RPG
« on: June 20, 2015, 08:22:23 PM »
Your problem: To color shift things, DON'T export as translucent & additive. Export WITHOUT those enabled.
I've already tried to color shift things (using Milkshape) with those disabled. At least the item appears transparent with them on.

15
Modification Help / Re: Ark - RPG
« on: June 18, 2015, 09:56:32 PM »
woo

Can you possibly give more detail in this? What are the colors/texture files of the model, and what does it look like without color shifting?

Unfortunately I can't help you with creating nodes in Milkshape, as I only use Blender. :(
I'm using a blank.png texture I made containing a alpha transparent image. Along with that I'm setting the export settings for the material/texture to be translucent and addidtive. The item appears in game as white and transparent/see through.

Pages: [1] 2