quick scripting job

I hope it’s alright if I post this in here. I tried posting in the collaboration forum, but got no replies. I’m on kind of a short deadline with this project need to find someone quickly who can help with this. This is an offer to PAY you for some quick, hopefully easy scripting work.

I’m trying to beef up my Unity-based architectural presentations there are some scripts I could really use, but just don’t have the time to learn scripting on my own. If you’re interested in doing this, let me know I can give you further details so you could quote a price for your services.

I’m looking for 3 scripts:

  • One that will link a mesh object to a pop-up information window to display text/graphics.

  • One to toggle between multiple splat maps on my terrain.

  • One for a simple helicopter-type movement system so my fps can be walking around in an environment, then levitate up, hover, fly around look at things from up in the air. I don’t need any banking or other tricks, but variable speed such as a sprint button would be nice.

I may be interested but unf i’m quite busy at this time. How much time do you have to deadline?

When you said splat map, are you thinking of a scene? As in transition from one scene to another?

Jim Cullen

Thanks for replying!

I’m presenting this at the end of June, so it’s a ways off, but with other time conflicts it doesn’t give me much time to work on game development.

In a perfect world, I’d be able to get the finished scripts by 06/14 - three weeks from now. That would give me some time to roll them into the game do some refining touches to the game’s look. Is that doable for you, Evesor?

Jcullen24 - When I’m talking about the splat map, I mean actually changing the jpg that’s applied to my terrain. In these presentations I typically need to show the site as it currently is - I use a heightmap to create the topo surface, and apply a splatmap that’s derived from a siteplan drawn in Autocad colored in Illustrator, then jpg’d. Then I need to show different options for changes to the site. These generally don’t require any changes to the heightmap, but the splatmap needs to be changed to show where roads, parking, sidewalks, etc. have been relocated. The only way I know to do this is to hit a key to jump to a totally different scene. I’d like to be able to just toggle between two or more splatmaps within one scene.

Hope this helps. If either of you, or anyone else is interested, I could send you my email we could move this dicussion off the boards. Gotta keep those moderators happy :slight_smile:

For displaying your roads and parking lots, you could jus create the meshes and set then to toggle the renderer so that with one button you could show them in the same scene(a before and after effect). I can show you how to do that.

If you want the info window to display on your hud instead of over the object when you hover your mouse over the object. thats easy too.

And i have a altered version of the wiki version of the fpsWalker script thats allows for levitation. It allows for movement in the air, and while jumping you hit a button and start flying/levitating the only thing is to cut it off i push another button and start falling. but if you hit the levi button again you make a smooth landing. its actually pretty fun. With a couple of vars im sure i could smooth it a little. :smile:

Well Mantis i’m so busy with university and XNA atm that i was doing this to help Weetie more than money wich i’m not in extreeme need. If you have spare time i’ll pass eagerly, as it seems you know what are you doing.

Mantis, I’ve tried what you suggest. I run into two problems - file size loss of flexibility. I’m typically modeling an entire college campus. Many roads sidewalks. The polycount goes through the roof it’s pretty tough to get the meshes to place precisely on top of the terrain - there are always spots where it floats above the ground or dives under it. The more important problem is that our planning team LOVES to change stuff at the very last moment. GRRR!!! Working with bitmaps I can just pshop the changes pop it back into the game.

The fpsWalker sounds sweet. Tell me more.

The hud sounds like it would work, too.

Since I’m shooting my mouth off here, I’d also like to get my hands on some scripting to creatively demolish existing buildings replace them with new ones. I floated the idea of an rpg, bfg, tactical strike or other enjoyably messy gimmick, but for some reason the Powers That Be seem to think it would remind people too much of war, terrorism, etc. ( considering half our office, including me, went to Virgina Tech, we’re a little sensitive about the whole weapons on campus thing these days) So… I thought some sort of disintegrator ray type thing. I’ve got a jetson’s-looking gun modeled a perlin lightning script, but could use some help figuring out how to set things up so I could zap predetermined buildings replace them with new ones.

If you or anyone else is interested in working with me on this, we could discuss pricing for your services swap emails etc. Thanks for your interest, everyone. God, I can’t wait for retirement, so I’ve got the time to learn how to do this stuff…

Well i’ll be happy to help :smile: Now i’m no code JEDI. But i’ll Give ya what i got and for free. So lets make it open to. That way the pros will come and top my examples to give you the best and alternate Code. :idea: Wow i haven’t thought about the events at Virginia Tech in a while, but i was living there when it went down. I wasn’t going to tech but i hung out there all the time learning all i could and drinking beers with the top coders and animators. My wife grew up there so we bought property there. And then the following year there was the whole cut off the head incident as well :shock: So now i’m at ECU sponging off the coders here, lol. Anyway i’ll post the code shortly :smile:

///==This script is for creating a info box when hovering over the object==\\\

var itemDescription1 : String;//This var is for holding a text string.
var itemDescription2 : String;//This var is for holding a text string.
var itemDescription3 : String;//This var is for holding a text string.
var itemCost : String;//This var is for holding a text string.
//////////////////////////////////////////////////////////////////////
var windowPosX = 0;//Window Position on the X axis.
var windowPosY = 0;//Window Position on the Y axis.
var windowSiseX = 0;//WindowSize on the Y axis.
var windowSiseY = 0;//Window Size on the Y axis.

var showWindow : boolean;//This var is for a true and false statement.
//////////////////////////////////////////////////////////////////////////////
function OnMouseOver() {
	showWindow = true;
}
//////////////////////////////////////////////////////////////////////////////
function OnMouseExit() {
	showWindow = false;
}
//////////////////////////////////////////////////////////////////////////////
function OnGUI() {
	if (showWindow)
	GUI.Window (0, Rect (windowPosX,windowPosY,windowSiseX,windowSiseY),ShowWindow,"Info");
}
function ShowWindow (windowID : int) {//Just add or remove any gui label for what you need
	GUI.Label (new Rect(10, 15, 90, 25), "Name:" + itemDescription1);
	GUI.Label (new Rect(10, 30, 90, 25), "Labor:" + itemDescription2);
	GUI.Label (new Rect(10, 45, 90, 25), "Square':" + itemDescription3);
	GUI.Label (new Rect(10, 60, 90, 25), "Cost:" + itemCost);
}///(Tip)If you add more lables remember to resize the window

FPSWalker Pro from the wiki. I did’nt do much here but you can fly. And lots of fun, Maybe someone could show me a way to control the flying a little better :smile:

///===WALKER PRO FROM THE WIKI WITH EXTRAS BY MANTIS===\\\

/*I added flyUp and flyDown if statments to make a flying /levitation efect.
   all you need is a character controller and mouseLook scripts to use. Be sure to set the look axis in the mouse look variables.
*/
var walkSpeed = 6.0;
var runSpeed = 11.0;
// If true, diagonal speed (when strafing + moving forward or back) can't exceed normal move speed; otherwise it's about 1.4 times faster
var limitDiagonalSpeed = true;
// If checked, the run key toggles between running and walking. Otherwise player runs if the key is held down and walks otherwise
// There must be a button set up in the Input Manager called "Run"
var toggleRun = false;
var flySpeed = 4.0;//Adjust the speed of the moveDirection.y in the inspector.
var jumpSpeed = 8.0;
var gravity = 20.0;

// Units that player can fall before a falling damage function is run. To disable, type "infinity" in the inspector
var fallingDamageThreshold = 10.0;
// If the player ends up on a slope which is at least the Slope Limit as set on the character controller, then he will slide down
var slideWhenOverSlopeLimit = false;
// If checked and the player is on an object tagged "Slide", he will slide down it regardless of the slope limit
var slideOnTaggedObjects = false;
var slideSpeed = 12.0;
// If checked, then the player can change direction while in the air
var airControl = false;
// Small amounts of this results in bumping when walking down slopes, but large amounts results in falling too fast
var antiBumpFactor = .75;
// Player must be grounded for at least this many physics frames before being able to jump again; set to 0 to allow bunny hopping 
var antiBunnyHopFactor = 1;
private var moveDirection = Vector3.zero;
private var grounded = false;
private var controller : CharacterController;
private var myTransform : Transform;
private var speed : float;
private var hit : RaycastHit;
private var fallStartLevel : float;
private var falling = false;
private var slideLimit : float;
private var rayDistance : float;
private var contactPoint : Vector3;
private var playerControl = false;
private var jumpTimer : int;
///////////////////////////////////////////////////////////////////////////////////////////////////////
function Start () {
    controller = GetComponent(CharacterController);
    myTransform = transform;
    speed = walkSpeed;
    rayDistance = controller.height * .5 + controller.radius;
    slideLimit = controller.slopeLimit - .1;
    jumpTimer = antiBunnyHopFactor;
    oldPos = transform.position;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
function FixedUpdate() {
    var inputX = Input.GetAxis("Horizontal");
    var inputY = Input.GetAxis("Vertical");
    // If both horizontal and vertical are used simultaneously, limit speed (if allowed), so the total doesn't exceed normal move speed
    var inputModifyFactor = (inputX != 0.0  inputY != 0.0  limitDiagonalSpeed)? .7071 : 1.0;
        if (grounded) {
        var sliding = false;
        // See if surface immediately below should be slid down. We use this normally rather than a ControllerColliderHit point,
        // because that interferes with step climbing amongst other annoyances
        if (Physics.Raycast(myTransform.position, -Vector3.up, hit, rayDistance)) {
            if (Vector3.Angle(hit.normal, Vector3.up) > slideLimit)
                sliding = true;
        }
        // However, just raycasting straight down from the center can fail when on steep slopes
        // So if the above raycast didn't catch anything, raycast down from the stored ControllerColliderHit point instead
        else {
            Physics.Raycast(contactPoint + Vector3.up, -Vector3.up, hit);
            if (Vector3.Angle(hit.normal, Vector3.up) > slideLimit)
                sliding = true;
        }
        // If we were falling, and we fell a vertical distance greater than the threshold, run a falling damage routine
        if (falling) {
            falling = false;
            if (myTransform.position.y < fallStartLevel - fallingDamageThreshold)
                FallingDamageAlert (fallStartLevel - myTransform.position.y);
        }
        // If running isn't on a toggle, then use the appropriate speed depending on whether the run button is down
        if (!toggleRun) 
            speed = Input.GetButton("Run")? runSpeed : walkSpeed;

        // If sliding (and it's allowed), or if we're on an object tagged "Slide", get a vector pointing down the slope we're on
        if ( (sliding  slideWhenOverSlopeLimit) || (slideOnTaggedObjects  hit.collider.tag == "Slide") ) {
            var hitNormal = hit.normal;
            moveDirection = Vector3(hitNormal.x, -hitNormal.y, hitNormal.z);
            Vector3.OrthoNormalize (hitNormal, moveDirection);
            moveDirection *= slideSpeed;
            playerControl = false;
        }
        // Otherwise recalculate moveDirection directly from axes, adding a bit of -y to avoid bumping down inclines
        else {
            moveDirection = Vector3(inputX * inputModifyFactor, -antiBumpFactor, inputY * inputModifyFactor);
            moveDirection = myTransform.TransformDirection(moveDirection) * speed;
            playerControl = true;
        }
        // Jump! But only if the jump button has been released and player has been grounded for a given number of frames
        if (!Input.GetButton("Jump"))
            jumpTimer++;
        else if (jumpTimer >= antiBunnyHopFactor) {
            moveDirection.y = jumpSpeed;
            jumpTimer = 0;
        }
    }
    else {
        // If we stepped over a cliff or something, set the height at which we started falling
        if (!falling) {
            falling = true;
            fallStartLevel = myTransform.position.y;
        }
        // If air control is allowed, check movement but don't touch the y component
        if (airControl  playerControl) {
            moveDirection.x = inputX * speed * inputModifyFactor;
            moveDirection.z = inputY * speed * inputModifyFactor;
            moveDirection = myTransform.TransformDirection(moveDirection);
        }
    }
	// Apply gravity
    moveDirection.y -= gravity * Time.deltaTime;
	// Move the controller, and set grounded true or false depending on whether we're standing on something
    grounded = (controller.Move(moveDirection * Time.deltaTime)  CollisionFlags.Below) != 0;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function Update () {
		//This Flying Up and Flying Down modes i put in myself and work pretty good for a levitation effect.
		//Notice the flySpeed var i also added for some control in the inspector to adjust the Move Direction.y.
		if (!Input.GetButton("Fly_Up")) //These imput keyword tags are assigned to buttons in the project settings.
		jumpTimer++;
        else if (jumpTimer >= antiBunnyHopFactor) 
		{  
		moveDirection.y = flySpeed;
		gravity = 0; 
        }
		if (!Input.GetButton("Fly_Down"))
		jumpTimer++;
        else if (jumpTimer >= antiBunnyHopFactor) 
		{
           moveDirection.y = flySpeed;
           gravity = 20; 
}		   
	// If the run button is set to toggle, then switch between walk/run speed. (We use Update for this...
    // FixedUpdate is a poor place to use GetButtonDown, since it doesn't necessarily run every frame and can miss the event)
    if (toggleRun  grounded  Input.GetButtonDown("Run"))
        speed = (speed == walkSpeed? runSpeed : walkSpeed);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function OnControllerColliderHit (hit : ControllerColliderHit) {// Store point that we're in contact with for use in FixedUpdate if needed
    contactPoint = hit.point;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// If falling damage occured, this is the place to do something about it. You can make the player
// have hitpoints and remove some of them based on the distance fallen, add sound effects, etc.
function FallingDamageAlert (fallDistance : float) {
    Debug.Log ("Ouch! Fell " + fallDistance + " units!");   
}
@script RequireComponent(CharacterController)

This next script puts the power in you hands Enable or disable asmost anything 8) Remember to size the window to fit all the toggles.

///===TOGGLE ON OR OFF===\\\

//This Script is for toggle on the array list for GameObjects LightObjects ScriptObjects.
//////////////////////////////////////////////////////////////////////////////////////////////////
var gameObjectsList : GameObject[];//Sets up a basic array List.
var scriptObjectsList : MonoBehaviour[];//Sets up a basic array List.
var lightsObjectsList : Light[];//Sets up a basic array List.
//////////////////////////////////////////////////////////////////////////////////////////////////
function OnGUI() {//Function OnGUI to command gui.
//////////////////////////////////////////////////////////////////////////////////////////////
	GUILayout.BeginArea(Rect(2, 100,100,128),"Light Objects",GUI.skin.window);
	for(var l in lightsObjectsList)
	{
	l.enabled = GUILayout.Toggle(l.enabled,l.name);
	}
	GUILayout.EndArea();
//////////////////////////////////////////////////////////////////////////////////////////////
	GUILayout.BeginArea( Rect(2,300,100,128),"Script Objects", GUI.skin.window);
	for(var s in scriptObjectsList)
	{
	s.enabled = GUILayout.Toggle( s.enabled,s.name);
	}
	GUILayout.EndArea();
//////////////////////////////////////////////////////////////////////////////////////////////
	GUILayout.BeginArea(Rect( 2,500,100, 128 ),"Game objects",GUI.skin.window);
	for(var g in gameObjectsList)
	{
	g.renderer.enabled = GUILayout.Toggle(g.renderer.enabled,g.name);
	}
	GUILayout.EndArea();
}
///(Tip)///This script can be put on any game object.

Now i hope the King Pin’s of code will add to these so we all win 8)