d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Official Off-topic In Chd > Pls No Lock Mods :(
Prev16516526536546551226Next
Add Reply New Topic New Poll
Member
Posts: 21,380
Joined: Dec 23 2007
Gold: 1.00
Apr 8 2016 06:09pm
Quote (King Atrhur @ Apr 8 2016 07:02pm)
Here ghot proof that even a 10 year old is smarter then you...
Heres my sons lua code to mod his game.


Code
<Layer
Condition="GAMESTATE:IsHumanPlayer(PLAYER_1)"
Type="Quad"
InitCommand="hidden,1"
StepP1MessageCommand="%function(self)
if GAMESTATE:GetSongBeat() >= 0 then
if herp1 == 0 then
P1:addy(1);
derp1 = derp1-0.01;
P1:zoom(derp1);
if derp1 == 0 then
herp1 = 1
end
else
P1:addy(1);
derp1 = derp1-0.01;
P1:zoom(derp1);
if derp1 == 2 then
herp1 = 0
end
end
end
end"
/>

<Layer
Condition="GAMESTATE:IsHumanPlayer(PLAYER_2)"
Type="Quad"
InitCommand="hidden,1"
StepP2MessageCommand="%function(self)
if GAMESTATE:GetSongBeat() >= 0 then
if herp2 == 0 then
P2:addy(1);
derp2 = derp2-0.01;
P2:zoom(derp2);
if derp2 == 0 then
herp2 = 1
end
else
P2:addy(1);
derp2 = derp2-0.01;
P2:zoom(derp2);
if derp2 == 2 then
herp2 = 0
end
end
end
end"
/>

<Layer
Type="Quad"
OnCommand="diffusealpha,0;sleep,1000;"
/>

<Layer
Type="Quad"
OnCommand="hidden,1"
InitCommand="%function(self)
checked = false;
-------------------------------------
-- my code --
-------------------------------------
mod_actions = {
{0.1,function()
if P1 then
P1:y(SCREEN_CENTER_Y);
P1:zoom(1);
derp1 = 1
herp1 = 0
end
if P2 then
P2:y(SCREEN_CENTER_Y);
P2zoom(1);
derp2 = 1
herp2 = 0
end
end},
}


Also will update you soon on unity progress ducky. Seems he really is more interested into java script atm.
but he did manage to make a few small animations with a sphere in unity.


GZ
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Apr 8 2016 06:55pm
Quote (King Atrhur @ Apr 8 2016 08:02pm)
Also will update you soon on unity progress ducky. Seems he really is more interested into java script atm.
but he did manage to make a few small animations with a sphere in unity.


That's good. I think he will enjoy unity. I suggest telling him to look at the C# scripts instead rather than the Javascript.

Not only is C# more supported in Unity, it will allow him to download visual C# and create desktop apps. Where as with Javascript if he wanted to venture further the most that would come from it is web applications, unless he uses frameworks like node n shit for command line stuff. I personally would take C# over javascript any day since he can use it with Unity as well as make desktop applications with it.

There was one video series I can't remember the name, but it was a 3d tutorial on how to make a plat-former with rectangles and spheres. It showed how to apply physics and textures and stuff to the objects.

https://www.youtube.com/watch?v=lQASc-4Wfj0

Was something very similar to this. I can't find the tutorial I seen from a few years ago though.

If he wants I can give him some of my scripts, for events and stuff. It basically allows you to send messages to different in game objects to manipulate them. For instance: https://www.youtube.com/watch?v=EWh6Ta5Of4c if you look at the two lamp posts by the tree I have set the lighting effect to turn off and on based on the time of day by basically sending it a message to turn off/on:

Code
public class LightPostScript : MonoBehaviour {
public void OnEnable() {
Messenger<bool>.AddListener("Morning Light Time", OnToggleLight);
}

public void OnDisable() {
Messenger<bool>.RemoveListener("Morning Light Time", OnToggleLight);
}

private void OnToggleLight(bool light) {
if(light)
GetComponent<Light>().enabled = false;
else
GetComponent<Light>().enabled = true;
}
}


Here I add a event listening for "morning light time" which runs the function "OnToggleLight". From there the function "OnToggleLight" turns the lighting object attached to it on/off depending if the sent message is true/false. True making the light effect turn on, and false turning it off.

Sending the messages are simple:

Code
Messenger<bool>.Broadcast("Morning Light Time", true);


Will send a message to every game object, and if they are listening for "Morning Light Time" they will trigger their respective callback functions as specified above.

This post was edited by AbDuCt on Apr 8 2016 07:18pm
Member
Posts: 109,874
Joined: Feb 1 2006
Gold: 10,152.00
Apr 8 2016 07:18pm
Quote (AbDuCt @ Apr 8 2016 07:55pm)
That's good. I think he will enjoy unity. I suggest telling him to look at the C# scripts instead rather than the Javascript.

Not only is C# more supported in Unity, it will allow him to download visual C# and create desktop apps. Where as with Javascript if he wanted to venture further the most that would come from it is web applications, unless he uses frameworks like node n shit for command line stuff. I personally would take C# over javascript any day since he can use it with Unity as well as make desktop applications with it.

There was one video series I can't remember the name, but it was a 3d tutorial on how to make a plat-former with rectangles and spheres. It showed how to apply physics and textures and stuff to the objects.


I think the interest in java stems from another game he plans to mod. In any event he knows C# is important.
But Like we discussed before he's got free direction with his projects. Seems to excel better at his own pace doing what he wants.
Rather not intervene and direct him more or less be here for when he hits a wall.
Member
Posts: 50,343
Joined: Apr 3 2008
Gold: 0.00
Apr 8 2016 07:34pm
THIS ELK BRATWURST IS SO FUCKING GOOD
Member
Posts: 109,874
Joined: Feb 1 2006
Gold: 10,152.00
Apr 8 2016 08:14pm
Haven't eaten elk in years. Prefer moose though.
Member
Posts: 50,343
Joined: Apr 3 2008
Gold: 0.00
Apr 8 2016 08:24pm
Quote (King Atrhur @ Apr 8 2016 06:14pm)
Haven't eaten elk in years. Prefer moose though.


I'm going to murder me an elk or deer this year for sure.


It's going to be tasty.
Member
Posts: 109,874
Joined: Feb 1 2006
Gold: 10,152.00
Apr 8 2016 08:33pm
Quote (Rikuo @ Apr 8 2016 09:24pm)
I'm going to murder me an elk or deer this year for sure.


It's going to be tasty.


my uncles trap for a living. mostly beavers for pelts for Hudson Bay Company.
They have fed me all different types of game over the years.
Rabbit/muskrat/porcupine/elk/deer/moose/Bison/boar/bear probably others can't recall most when i was a kid.
Also eaten a few other things like kangaroo,shark, and others misc shit over the years..

This post was edited by King Atrhur on Apr 8 2016 08:33pm
Member
Posts: 50,343
Joined: Apr 3 2008
Gold: 0.00
Apr 8 2016 09:08pm
Quote (King Atrhur @ Apr 8 2016 06:33pm)
my uncles trap for a living. mostly beavers for pelts for Hudson Bay Company.
They have fed me all different types of game over the years.
Rabbit/muskrat/porcupine/elk/deer/moose/Bison/boar/bear probably others can't recall most when i was a kid.
Also eaten a few other things like kangaroo,shark, and others misc shit over the years..


Sounds interesting.

I remember a few weeks a taco shop in NY selling Lion meat taco's for $50 a pop lol
Member
Posts: 109,874
Joined: Feb 1 2006
Gold: 10,152.00
Apr 8 2016 09:27pm
Quote (Rikuo @ Apr 8 2016 10:08pm)
Sounds interesting.

I remember a few weeks a taco shop in NY selling Lion meat taco's for $50 a pop lol


bush meat maybe, I wonder how legal that is.
Member
Posts: 50,343
Joined: Apr 3 2008
Gold: 0.00
Apr 8 2016 09:29pm
Quote (King Atrhur @ Apr 8 2016 07:27pm)
bush meat maybe, I wonder how legal that is.


It was legal. I forget the entire story, But the lion had died of natural causes.
Go Back To Computers & IT Topic List
Prev16516526536546551226Next
Add Reply New Topic New Poll