• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to use the SEE 1.2 System for a key controlled car map?

Status
Not open for further replies.
Level 2
Joined
Jan 21, 2008
Messages
16
Hello :)

Im working on a key controlled racing map. Its nearly finished, but without realistic physic. The Simple Entity Engine 1.2 from HINDYhat looks perfect for that.
My Problem is, that i dont know how to use it correctly. There methods like: on order and something like that. Mine is key controlled ...
Im not that good in Jass and hopefully someone can help me :)

thanks!
 
Level 11
Joined
Aug 25, 2006
Messages
971
Your going to use that in a racing game? Thats meant for projectiles and such. I'm not completely sure why you'd want to implement it in a racing game.

It supports making things bounce/collide and other 3d physics.
 
Level 2
Joined
Jan 21, 2008
Messages
16
Well he probably wants his cars to jump on ramps and/or bang to each other and/or fall from cliffs (c00l ! :p) :gg:

Exactly :gg:
I've finished all controll things like acceleration, steering and things like that. But no jumps at roofs, realistic collision and stuff like that (as GhostWolf said).


I've tried to contact HINDYhat via PM but he hasn't answered so far.
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
Need_O2 said:
I dont think HINDYhat will like to have his project used by NOT JASS users
I'm quite capable of making my own decisions.

iNfamous, sorry for the late reply, but I've been kind of busy and lazy lately. The vehicle system works by simply pushing the entity towards the direction it's facing. So if you'd like to make the car system key-controlled, you'd just have to rotate the entity unit every time you click on the corresponding arrow key. Also, to stop the car, there's a custom method called ToggleEngine I think.

Honestly though, if you have never worked with Jass, I really suggest you try to learn it first, or do something a bit more simple. If you need detailed help, I'll try later today, because for now, I have to go to school :p
 
Level 2
Joined
Jan 21, 2008
Messages
16
Im not a totally beginner in jass. My Car system is ~80% written in jass (no good jass imo..).

I allready rotate the car when pressing a direction, so i just have to ToggleEngine = true when a acceleration key is pressed. (toggle it off when released)
How do i implement some braking stuff then?

Thanks for your support :aa:
 
Level 2
Joined
Jan 21, 2008
Messages
16
Well why are you not making a negative acceleration key ?

I'm not sure if i understood you correctly.
My system is working fine, braking, driving backwards slowly and so on.
But if i would use that system, for some nice physics, everything is different (my old work become obsolete [but its no problem if it works better with the SEE system]).

If you need detailed help, I'll try later today..

That would be very nice :)
 
Last edited:
Level 20
Joined
Apr 22, 2007
Messages
1,960
I allready rotate the car when pressing a direction, so i just have to ToggleEngine = true when a acceleration key is pressed. (toggle it off when released)
How do i implement some braking stuff then?
Excellent. Braking would have to be with a seperate hotkey (not the arrow keys). I'd suggest the 'Stop' order, which can be used within a 'Car' entity as follows:
JASS:
    method onOrder takes Entity e returns nothing
        if GetIssuedOrderId()==OrderId("stop") then
            set e.Drive=false
        endif
    endmethod
That will brake the vehicle if 'Stop' is ordered.

As far as turning, that would only be controlled by the right-left arrow keys. The front arrow key would set the .Accel member to stricly positive (RAbsBJ(.Accel)), and the backwards key would set it strictly negative (-RAbsBJ(.Accel)). You could make that alot better, but I don't feel like writing code now so bleh. And that's just a theory. In practice... I'm guessing it should work.
 
Level 2
Joined
Jan 21, 2008
Messages
16
Thanks!

Problems:

-the Car model (tried my imported and a basic model) wont follow the unit
-its a bit like ice skating, how (which Numbers) do i change that?
-driving up a hill for example (not that rising) will cause in 0 speed, and with some tries you come up there (normally a car with enough speed would come up that without problems)
-When jumping down a little hill the car also brakes down to 0 speed,normally you would become a bit slower but not that much
-How can i add collision on doodads and things like that?
( i've made a check pathable for my system (creation of a unit, then check coordinates) , can i use that too?)

Thank you very much! :csup:
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
Thanks!

Problems:

-the Car model (tried my imported and a basic model) wont follow the unit
-its a bit like ice skating, how (which Numbers) do i change that?
-driving up a hill for example (not that rising) will cause in 0 speed, and with some tries you come up there (normally a car with enough speed would come up that without problems)
-When jumping down a little hill the car also brakes down to 0 speed,normally you would become a bit slower but not that much
-How can i add collision on doodads and things like that?
( i've made a check pathable for my system (creation of a unit, then check coordinates) , can i use that too?)

Thank you very much! :csup:

- o_O Well it should work fine if the Car entity is either based off a unit with that model as it's model, or if the "ModelPath" member of your Car entity is your model's model path.
- Increase 'Traction' (the third parameter to the MakeVehicle method) to about 1.1 (or a tiny bit more), and increase 'Accel' (the first parameter to the MakeVehicle method) until you feel the speed is good.
- Either increase the GRAVITY_FORCE constant in the 'SEECore' trigger, or adjust the 'BounceFactor' and 'FrictionFactor' members of your Car entity until it looks good.
- ..? I don't really understand :p
- Well your doodads would have to be entities (which is impossible). So what you'd do is make a dummy unit, and a, let's say, Tree entity. The Tree's ModelPath would be the doodad's normal model path. Also, be sure that you have these members in your Tree entity:
JASS:
boolean Affected=false
boolean Collideable=true
You should adjust the 'Offsetz' member according to the model's height (just test it and then adjust). The cars should collide with that.

Just another thing that I noticed... car collision is alot better when Offsetz is a smaller value. Dunno why. Maybe I messed something up, but bleh.
 
Level 15
Joined
Jun 28, 2007
Messages
1,424
infamous

Let me just tell you one thingh that might help you
I was the guy who the system was ordignaly made for (VwheicalsEnteys)
and i didnt use arrow keys for a reason
What you are going to do is going to cause the map to sprial into hell
So Stop

That and to make it arrow key controled requeirs you to know Vjass
And to use WEJNGPU
And RTC witch see donst seem to like
 
Level 2
Joined
Jan 21, 2008
Messages
16
Very Nice, HINDYhat!

Everything except for the following (ok, i havent tried doodad collision for now^^) is working

-driving up a hill for example (not that rising) will cause in 0 speed, and with some tries you come up there (normally a car with enough speed would come up that without problems)

Heres a picture to illustrate it a bit:


The blue line shows the wanted path (not at all exact)
Normally you would become a bit slower, but you wont loose all speed (red text).
Ive changed all mentioned values , but it wont get better.

Thanks, again :)

@DesKaladA: could you explain it more specific? I cant understand it :D
 
Level 2
Joined
Jan 21, 2008
Messages
16
@DesKaladA: could you explain it more specific? I cant understand it :D
Just dont try it
For what you want to do its not worth the time and effort
You need to learn jass before you should tackle this idea

..hmm, sorry.
-Why i have to learn jass (im average at jass imo)
-why this wont work
-why i shouldnt try it
-why why why :fp:
(see the first quote)

In my opinion this post is absolutely 100% spam. Stop that please!
Thanks.
 
Level 3
Joined
Aug 24, 2007
Messages
77
You don't have to be mean to Des, hes only saying that he tried and failed because doing what you doing was very difficult and that you shouldn't waste time in it. Its funny that you don't know why you need to learn JASS in order to use a vJASS system...
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
..hmm, sorry.
-Why i have to learn jass (im average at jass imo)
-why this wont work
-why i shouldnt try it
-why why why
(see the first quote)
- You don't have to know it in-and-out, although you need a solid background.
- Arrow keys? They cause MAJOR lag in multiplayer games. Have you ever played that blizzard racing map? Yeah...
- Because it's too much of a hassle and won't work out as you want it to.

About the driving up a hill part, try reducing gravity (in the SEECore constants), or reducing FrictionFactor/BounceFactor and stuff like that. Or also try reducing the TerrainTraction at the slope.
 
Level 3
Joined
Aug 24, 2007
Messages
77
Yeah I made a quick racing game using the system and controlling the car with arrow keys first caused major delay online and it ended up looking like the drivers were drunk but then I changed some things around and made turning more responsive; less delay.

I also got jumping down hills working a bit and have a couple large ramp jumps as well as a tag system (although tag is buggy). Its a 3 player map and you guys can check it out if you want:
 

Attachments

  • Race2.w3x
    147.4 KB · Views: 40
Last edited:
Status
Not open for further replies.
Top