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

Pages: 1 ... 192 193 194 195 196 [197] 198
2941
Suggestions & Requests / [Engine Change] Dynamic Skybox
« on: February 26, 2011, 02:31:39 PM »
Problem: If the client renders the game with no skyboxes, or with two skyboxes and one is later deleted, the game crashes.

Solution #1: Add networking to the Sun and Sky classes that allow some of their more prominent properties to be changed on-the fly.

I am requesting the following functions be added to the engine.

Class: Sun
::setAmbient(ambient)
::setAzimuth(azimuth)
::setColor(color)
::setElevation(elevation)

Class: Sky
::setFogColor(color)
::setMaterialList(dml file location)
::setSkySolidColor(color)

Solution #2: A quickfix that lets the client render the game without a skybox. This will allow the developer to delete and recreate the skybox without worrying that latency will cause the client to crash.

Why should Badspot add this?: Add-on development has reached a cap. The limitations of Torque and the lack of engine goodies has stymied production of new and interesting toys and features. This is a very simple thing that will open up a new dynamic the game has yet to see done well: Day and Night Cycles.


If you support this change, leave a post.

2942
Off Topic / Re: Post real life pictures of yourself.
« on: February 26, 2011, 02:17:01 PM »
Isn't this like your 3rd account on here Iban?
I've been hanging around this small town since I was 12 or 13. This is my third account in 6 years.

2943
Off Topic / Re: Which Browser do you prefer the most?
« on: February 26, 2011, 02:15:39 PM »
I'm the kind of guy that would let Google tattoo its logo on my ass and assign an agent to live in my house with me so it can report everything about me to The Overmind.

Chrome is awesome.

2944
Off Topic / Re: Post real life pictures of yourself.
« on: February 26, 2011, 02:09:50 PM »
You haven't had a loving girlfriend then. She's not beautiful, she's attractive / pretty.
Lol, you've never seen a girl before.
Yikes. I don't know what kind of kind of angst and butthurt crawled out your ass, but I don't think you should be criticizing Sleepy Dinosaur or the word choice people are using to describe her.

Just to spite you: Sleepy Dinosaur (or, at the very least, the girl in the picture provided) is beautiful.

2945
Modification Help / Re: RTB Development
« on: February 26, 2011, 02:04:29 PM »
Take your time.

2946
Off Topic / Re: Cleverbot
« on: February 26, 2011, 01:43:38 PM »
I think that Cleverbot is not a bot, but just a chat system where you think you're talking to cleverbot and so does the person who you're actually talking to. That's why the chat always seems partially coherent, yet disconnected: you're talking to different people as your other contact leaves the site.

Also, read this before complaining about people under the age of 13.

2947
Modification Help / Re: IFL textures
« on: February 26, 2011, 01:38:18 PM »
But that makes sense. Look at how Badspot made the "Ghosting" IFL. He ran a bunch of static images one after another.
That is not an IFL, that would be a GUI element.

2948
Off Topic / Re: Post real life pictures of yourself.
« on: February 26, 2011, 01:37:25 PM »
that would be mobiusly obese
snot just went there.

2949
Off Topic / Re: Post real life pictures of yourself.
« on: February 26, 2011, 01:27:07 PM »
So you'd rather watch at something like this instead.
Robotnik is my secret gay love interest.

2950
Off Topic / Re: Post real life pictures of yourself.
« on: February 26, 2011, 01:23:39 PM »
in her defense, that was before she became anorexic lol.
There is no excuse for wearing fishnets when you're that morbidly obese.

2951
Modification Help / Re: IFL textures
« on: February 26, 2011, 01:21:11 PM »
Huh, so that's what an IFL is. This explains a lot.
CityRPG's GUI has IFLs in it but I never really quite understood what they were.

In the Stats GUI, there is an animated object like the one in the Options GUI where you play dress-up. In order to set the face or chest decal, you need to use this:

Code: [Select]
CRPG_Avatar.setIflFrame(CRPG_Avatar.dynamicObject, "face", getIflFrame("face", $Pref::Avatar::FaceName));
CRPG_Avatar.setIflFrame(CRPG_Avatar.dynamicObject, "decal", getIflFrame("decal", CRPG_Avatar.decal));
(CRPG_Avatar is the GuiObjectView. CRPG_Avatar.dynamicObject is the embedded dynamic object.)

This diddy gets the line of the IFL file specified where %name appears.
Code: [Select]
function getIflFrame(%node, %name)
{
%file = "base/data/shapes/player/" @ %node @ ".ifl";

if(isFile(%file))
{
%name = stripTrailingSpaces(fileBase(%name));

if(%name !$= "")
{
%fo = new FileObject() {};
%fo.openForRead(%file);

%hasFound = false;
%lineNum = 0;

while(!%fo.isEOF())
{
%line = %fo.readLine();
%thisDecal = stripTrailingSpaces(fileBase(%line));

if(%thisDecal $= %name)
{
%hasFound = true;
break;
}
else
{
%lineNum++;
}
}

%fo.close();
%fo.delete();

if(%hasFound)
{
return %lineNum;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
else
{
echo("\c2getIflFrame(\"" @ %node @ "\", \"" @ %name @ "\") : You did not supply a proper IFL file name to read from.");
return 0;
}
}


The IFL file is a composite of file paths to all default and add-on decals.
Code: [Select]
base/data/shapes/player/decals/AAA-None.png
Add-Ons/Decal_Zombies/ZAPT-Witch.png
Add-Ons/Decal_Zombies/ZAPT-Suit.png
Add-Ons/Decal_Zombies/ZAPT-StoClerk.png
Add-Ons/Decal_Zombies/ZAPT-MallCop.png
Add-Ons/Decal_Zombies/ZAPT-Bowling.png
Add-Ons/Decal_Zombies/ZAPT-BillyMays.png
Add-Ons/Decal_Zombies/ZAPT-Basketball.png
Add-Ons/Decal_WORM/worm_engineer.png
Add-Ons/Decal_WORM/worm-sweater.png

So if I
Code: [Select]
echo(getIflFrame("decal", "Add-Ons/Decal_Zombies/ZAPT-Witch.png"));

It prints this
Code: [Select]
1


What this says to me is that IFL files are not actual animations but a collection of single frames. This means the player's face and decal is actually a single frame in a still animation.


Beyond that, beats me. I can't model so I don't know anything about the process. Perhaps try referencing an IFL file instead of a PNG file for a texture, and then set the IFL file up properly. That may work.

2952
Add-Ons / Re: Respawn All Players
« on: February 26, 2011, 01:01:21 PM »
This code looks really familiar.

The point of /respawnallplayers is actually for testing purposes. In the event you modify something that hinges on the player object, or people are running around with items they shouldn't have that they got from an exploit, this function remedies that.

2953
Modification Help / Re: Making a player spawn at a specific spawn point.
« on: February 26, 2011, 12:49:29 PM »
GameMode_ZAPT/scripts/package.cs
Overriding the default spawning mechanism.
(Must go in a package.)
Code: [Select]
function MinigameSO::pickSpawnPoint(%so, %client)
{
// Are we spawning as the tank?
if(%client.spawningAsTank)
{
// Get a tank spawn point.
%point = ZombieDirector.pickSpawnPointTank(%client);
}

// If we aren't, or there is no tank spawn point...
if(%point $= "")
{
// Are we spawning as a zombie?
if(%client.isZombie)
{
// Get a zombie spawn point.
%point = ZombieDirector.pickSpawnPoint(%so, %client);
}

// If we aren't, or there is no zombie spawn point...
if(%point $= "")
{
// Get a default spawn location.
%point = parent::pickSpawnPoint(%so, client);
}
}

// Return our spawn spot.
return %point;
}

GameMode_ZAPT/scripts/scriptobjects.cs
Scanning through a group of spawns to find the one we want.
This is a bit clumsy and hard to read, so just keep in mind all we're doing here is going through a simgroup and applying logic to it to determine which ones are valid.
Code: [Select]
function ZombieDirector::pickSpawnPoint(%so, %mini, %client, %ignorePref)
{
if(zombieGameSetUpRight(%mini))
{
%ss = %so.zombieKeeper;

if(isObject(%ss))
{
%spawns = 0;
%spawnList = "";

for(%a = 0; %a < %ss.getCount(); %a++)
{
%spawn = %ss.getObject(%a);
%spawnMini = getMiniGameFromObject(%spawn);

if(zombieSameGame(%client, %spawn) && miniGameCstar fishe(%spawnMini.owner, %spawn))
{
%db = %spawn.vehicleDatablock;
%spawnPos = %spawn.zombieSpawnPoint();

if(isObject(%db) && %db.isZombieArmor && !%db.zombieAIOnly && (!%db.zombieAdminOnly || %client.isAdmin))
{
if(%so.isPosNearPlayer(%mini, %spawnPos, %ignorePref != 2 ? $ZAPT::MaxDist : -1,  8))
{
if(%ignorePref || %db.getID() != %client.zombieDidNotWant)
{
if(!%spawns)
{
%spawnList = %spawn.getID();
}
else
{
%spawnList = %spawnList TAB %spawn.getID();
}

%spawns++;
}
}
}
}
}

if(%spawns)
{
%spawnBrick = getField(%spawnList, getRandom(0, %spawns - 1));
%spawnPoint = %spawnBrick.zombieSpawnPoint();

%client.zombieSpawnBrick = %spawnBrick;

return %spawnPoint;
}
// Rerun the test, this time ignoring any preferences.
else if(%ignorePref < 2)
{
return %so.pickSpawnPoint(%mini, %client, %ignorePref++);
}
}
else
{
error("CRITICAL ERROR: ZombieDirector.zombieKeeper not found!");
}
}

return "";
}

GameMode_ZAPT/scripts/functions.cs
Getting a proper 7-point float from a brick to give to the spawn system.
This function is a convenience thing. I advise that you just apply this code to the brick instead of making a function to do it for you.
Code: [Select]
function fxDTSBrick::zombieSpawnPoint(%this)
{
%box = %this.getWorldBox();
%point = vectorAdd(getWords(%box, 0, 1) SPC 0, getWords(%box, 3, 4) SPC 0);
%point = getWords(vectorScale(%point, 0.5), 0, 1) SPC getWord(%box, 5);
%trans = %point SPC getWords(%this.getTransform(), 3, 6);

return %trans;
}



package the spawnplayer function and set their location to where you want.  I recommend terminal velocity falling height.
Terminal velocity is not the velocity at which a person dies or will collide with the ground so hard they die.
Terminal velocity refers to the speed at which an object can not be accelerated further by gravity (or something like that).

2954
Modification Help / Re: CityRPG Syntax Error
« on: February 26, 2011, 12:35:39 PM »
Code: [Select]
db		= $CityRPG::jobs::datablock;

This is the correct answer.

The implementation of jobs that this copy uses was suggested by Trader and uses something very similar to JVS. To his credit, it's a very fancy fung sheuing of how the engine works to save and load information.

1. Editor makes a job file where he defines a series of global variables.
2. Scripts execute this file which is just a bunch of variable declarations.
3. Scripts make a scriptObject based on global variables defined in the config file.
4. Deletes all global variables to prevent them from appearing in the next scriptobject.


Of course, knowing this really does not matter if all you're doing is mass producing a bunch of stuffty jobs. Why you're editing that file in the first place is beyond me.

2955
Modification Help / Re: Preload failed
« on: February 26, 2011, 12:29:36 PM »
Put this in after the datablock.

Code: [Select]
echo("SkeleBody Check:" SPC isFile(DatablockName.shapeFile));

Will echo 1 if the file exists, 0 if the file does not exist. If it does not exist, I suggest using a more explicit filepath.
(Add-Ons/Player_Skeleton/shapes/SkeleBody.dts)

If it does exist, then the dts is invalid.

Pages: 1 ... 192 193 194 195 196 [197] 198