Scripts / Issue with raft+script

Author
Message
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 18th Aug 2014 19:55 Edited at: 19th Aug 2014 16:48
I have modeled my own raft, but I'm thinking of making an aircraft, when you see the video you will understand, why.







The problem with the raft going up, is already fixed up, but the raft was still going left, instead of going forward.



What am I doing wrong?

I tried a waypoint, but does not work.



script









Edit: can someone give me some advice, about how the video link Works, please.



Thanks in advance.



3com
PM
tomjscott
User Banned
Posted: 18th Aug 2014 23:17
You'll probably need to adjust the entity's facing in the fpe file with the fixnewy parameter. Possibly fixnewy = 90. And you should use MoveForward on the entity.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 19th Aug 2014 12:17
Thanks tomjscott, I'll try on this night.
What's about viodeo link?

3com
PM
Emrys
10
Years of Service
User Offline
Joined: 4th Nov 2013
Location: UK
Posted: 19th Aug 2014 15:19
Hi 3com

You just need the cdvj6MMKNlo part of the youtube link


HTH



PC - Windows 7 64bit, Intel i5, 12Gb Ram, 1TB WD Black, Evga Gefore 760gtx 3GB

Laptop - Windows 8.1 64 Bit, Core i7-3632QM processor, 8GB of RAM, 1Tb Hdd, Nvidia Geforce GT 740m
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 19th Aug 2014 17:05
Thanks E30Legend, fixed.

Also I had fixed raft issue, now I should discover how stop raft when needed. I do not found any command to do so in Reloaded.

@ tomjscott

I do not found any command in Reloaded called "fixnewy", I would like to get moore info about those commands.
I'had re-readed this link http://fpscrforum.thegamecreators.com/?m=forum_view&t=208970&b=2,even the Reloaded tutos already existing nowaday. Anyway I added fixnewy = 90 to my script and Reloaded do not refuse it, this make me to thing than the command exist, but perhaps does not documented yet.
Or it could be my fault.

Thanks again to both for the tips.

Team working hard, and Everyone is invited to the party of zombies.

3com
PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 19th Aug 2014 17:44
fixnewy is in the fpe file of the entity you are editing.

Change the file, save. Clear dbo, and bin files, retest.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 19th Aug 2014 18:10
Cool Pirate Myke, thanks for the input

Now I'm going to try if CollisionOn(e) can help to stop raft, and prevent it arrives to Australia.


3com
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 19th Aug 2014 18:20
what do you mean "stop the raft"? it depends when you want it to stop....
if you mean stop it going through the terrain then you can use something like


inside the main function of your code
(note the 400 may be a little wrong, you will need to adjust to suit the height of your water)

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 20th Aug 2014 15:30
Quote: "what do you mean "stop the raft"? it depends when you want it to stop...."

Please see video bellow and you'll get my point.





I though some sort of StopMoving is needded.
Also I was looking for associated entity/player command
like Classic does (GravPlatform), but I do not had found nothing related with.
The idea is that the roaft transport player, even entities.

As you can see, I be able to stand up the raft when collidde with bridge, but does not when it return back, yet.

@ smallg
thanks for the tip, unfortunatelly, raft does not move with your code. I was playing with this value, g_Entity[e]['y'] > 400, but nothing change.

3com
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 20th Aug 2014 18:09
actually i just looked at my old raft script and i used g_PlayerPosY instead of g_Entity[e]['y'] because entities dont follow terrain yet but i don't think that's going to work in your case as you want the raft to move even when the player isn't on it - which wasnt the case for mine.

the best way to do it i guess is to determine when you want it to stop and set a trigger to tell it to reverse (maybe stop in place for a while first) and likewise at the other point

something like


life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 21st Aug 2014 19:28
Done!
The raft hits the course correctly and stops when colliding with the bridge.

I decided to change the focus of the case, at least until Reloaded expose new commands that can be used to get what I want.

new approach

a- The raft has to go from start point to end point.
b-The raft should stop moving when it reaches the end point. (bridge)
c-The raft should move only when the player is on board.
d- The idea is to transport the player from point A to point B and vice versa.
Point D is giving me problems, I do not understand that the player falls under the raft when he climbed aboard.
You can see the problem at the end of the video below.



Script that reliza path from Point A to Point B, and stops.



In FPS Classic, you can associate the player with antiGravitPlatform, but in Reloaded Lua, does not find any command, to relize this feature.

That said, we have to wait for better times.

3com
PM
tomjscott
User Banned
Posted: 21st Aug 2014 22:23
You have to have Physics On for the raft to allow the player to collide with it. However, current physics systems only have box collision, which means you'd end up standing in mid-air at the level of the raft pole you have created. I tried to do a boat for my demo game and found out all this in speaking with Scene Commander. Now, if your raft was just a flat rectangular thing with nothing jutting up from it then you could do it. However, moving the raft wouldn't also move the player. It would need some invisible wall behind the player to push him forward. I've done that and it works.

Aside from that, your raft should move a lot faster to match those wave speeds.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 22nd Aug 2014 11:15
you can always just use another invisible "wall" for the player to stand on rather than the boat itself

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
tomjscott
User Banned
Posted: 22nd Aug 2014 15:03
Quote: "you can always just use another invisible "wall" for the player to stand on rather than the boat itself"


Yes, and that's a good solution in this case. It's all rather hackish though at this point and hopefully they'll improve all this down the road.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 22nd Aug 2014 16:15
Thanks guys, I'll try.
coming soon...

3com
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 26th Aug 2014 22:20
Well friends, I have found a contradiction in reloaded, that forces me to wait for better times.

a- PhysicsOn = No. You can move an entity, but anything that you locate above this entity falls down, through the entity,

b- PhysicsOn = Yes. You can place anything on top of the body including the player, and this is kept up, but the entity (raft) does not move.

I tried to place the player on top of a wooden-pallet, with the invisible wall behind the player, but if I set PhysicsOn = no, the raft moves as normal, but the pallet including the player do not move the site, otherwise the pallet moves with the raft, but the player falls through the raft.

That said, poly-collision is needed.

3com
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 26th Aug 2014 22:22
Now I have another question for you artists.

I am modeling the kon-tiki raft, as you can see in the images below.







Obviously I use various textures as you can see in the image below, but I do not know how to apply them.



I want Reloaded retains all its textures, but I do not know how do it.

Some tutorial that teaches how to do it?

Thanks in advance

3com
PM
tomjscott
User Banned
Posted: 27th Aug 2014 00:34
You need to have a separate invisible entity that the player stands on with physics enabled and is dynamic and has gravity off. You also need an invisible segment for pushing the player with the same attributes. When you move the raft in the script, you must also move the invisible segments exactly the same to keep them in sync.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 27th Aug 2014 15:19
Model looks nice. What program are you using? You should be able to bake the texture of the whole thing on to one texture sheet.

Search the forum or internet for baking procedures for the model software you use.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 27th Aug 2014 20:19
@ Tom
Wooden pallet and wall, both sharing script and properties are the same.

-- LUA Script - precede every function and global member with lowercase name of script + '_main'
-- pallet

function pallet_init(e)
GravityOff(e)
Co

Attachments

Login to view attachments
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 27th Aug 2014 20:25
@ Mike
I'm using Milkshape 3D 1.8.4.
It has a texture editor as you can see in the picture below; but only edit textures separately, and can not find the function that creates a texture sheet.



3com
PM
tomjscott
User Banned
Posted: 27th Aug 2014 22:00
The video says its private so it can't be viewed. I am wondering why you are calling ModulateSpeed for this. That seems unnecessary. If I have some time, I'll try to get something that works. I was trying to do boats once too and failed, but that was during the transition from 1.0071 to 1.008 and some things have changed and I've learned a few things. I do think it should be possible.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
tomjscott
User Banned
Posted: 27th Aug 2014 22:33
Well, after giving this a try again, it's all coming back to me what the issue with this was. With Physics on and Gravity Off there is a bug and no amount of scripting is going to make this work just now. I'll have to remind Scene Commander of this issue and see if they ever got around to fixing it for the next release.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 28th Aug 2014 00:16
Quote: "The video says its private so it can't be viewed"

Sorry my mistake, I forgot to make the video public, now is already fixed.

Quote: "With Physics on and Gravity Off there is a bug and no amount of scripting is going to make this work just now."

Yes, I think so.

Quote: "I'll have to remind Scene Commander of this issue and see if they ever got around to fixing it for the next release."

Good idea.

Thanks Tom, you are a very good person.

I am sorry not to participate in the IRC, my English is not very good, since it is not my native language, but Spanish.

As for Omega core, yet I lack a lot of knowledge to use it as it should, but it will come.

3com
PM
tomjscott
User Banned
Posted: 28th Aug 2014 00:42
I sent SC an e-mail to see if there is any update on this. Maybe I'll hear back something tomorrow.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
tomjscott
User Banned
Posted: 28th Aug 2014 16:42
I'm sorry to report that TGC has not yet addressed this issue. I'm asking if it'll get into 1.009. I'll report back when I hear from them again.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 28th Aug 2014 18:48
Wish I'd read this thread earlier, I've just spent 2 hours trying to allow the player to land on flying platforms. Got the platforms to fly and move OK but can't get the player to land on them I think for the same reasons outlined here - gravity off and physics on makes the platforms fall out of the sky but can land on them. Gravity off and physics off, get great flying platforms but can't land on or hit them.

Oh well, hope it gets fixed at some point

3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 28th Aug 2014 20:39
Quote: " I'll report back when I hear from them again."

Cool

Meanwhile I'll try to get improve my skills, with Milkshape + texture sheet.
I had found a very useful wolf's tuto about that.

3com
PM

Login to post a reply

Server time is: 2024-05-03 07:34:15
Your offset time is: 2024-05-03 07:34:15