Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / Dynamic light follows the object?

Author
Message
arrojar entidad y que explote
9
Years of Service
User Offline
Joined: 3rd Jan 2015
Location:
Posted: 15th Jul 2015 16:06
Hello community, a question, I have a lamp object that can move around the stage, and I need to follow that object as a dynamic light. simulating a mobile lamp. I do not need script, I just need someone to guide me to do it myself. thanks
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 16th Jul 2015 18:29
Hi. Im not usually the first one to say this as whenever someone tells me something cant be done Im usually the first to attempt to prove them wrong, but Im not actually sure this is possible in FPSC.

I think some of the source mods managed to achieve it but Ive never been able to achieve it myself.

You could try practicing with a regular dynamic entity scripting it to follow way points, then maybe open up a light.fpi script and merging your movement script with it?

Hope you get it working that would be a great achievement.

Look in the docs folder of you fpsc directoy and there should be a pdf listing all the fpi script commands you should need to create the waypoint AI

smoke em if you got em
arrojar entidad y que explote
9
Years of Service
User Offline
Joined: 3rd Jan 2015
Location:
Posted: 16th Jul 2015 19:36
Sinister Spoon

hello, if you and tried in many ways, use commands, flashlight, lightrage: these two command do not work in segments with shader. They not displayed.


I tried with lighton, ambience = x, fog. combining with the following command, Lightfollowplr. and nothing.

all I tried and some very absurdly, these two are the most compelling. LoL.

Test 1:

:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse


:activated=2:waypointstop,settargetname=lamp,state=2
:state=2:rotatetotarget,lighton
:state=2,movefore=2



Test 2:

Then there is this script that belongs to a life according flashlight player:

:state=0:FlashLight=1
:State=0:FlashLightRange=300
:State=0:FlashLightRed=250,FlashLightGreen=0,FlashLightBlue=0,state=1

:State=1:plrhealthequal=100:FlashLightRed=250,FlashLightGreen=0,FlashLightBlue=0,state=1
:State=1,plrhealthless=100,plrhealthgreater=90:FlashLightRed=225,FlashLightGreen=0,FlashLightBlue=0,state=2
:State=1,plrhealthless=91,plrhealthgreater=80:FlashLightRed=200,FlashLightGreen=0,FlashLightBlue=0,state=2
:State=1,plrhealthless=81,plrhealthgreater=70:FlashLightRed=175,FlashLightGreen=0,FlashLightBlue=0,state=2
:State=1,plrhealthless=71,plrhealthgreater=60:FlashLightRed=150,FlashLightGreen=0,FlashLightBlue=0,state=2
:State=1,plrhealthless=61,plrhealthgreater=50:FlashLightRed=125,FlashLightGreen=0,FlashLightBlue=0,state=2
:State=1,plrhealthless=51,plrhealthgreater=40:FlashLightRed=100,FlashLightGreen=0,FlashLightBlue=0,state=2
:State=1,plrhealthless=41,plrhealthgreater=30:FlashLightRed=70,FlashLightGreen=0,FlashLightBlue=0,state=2
:State=1,plrhealthless=31,plrhealthgreater=20:FlashLightRed=50,FlashLightGreen=0,FlashLightBlue=0,state=2
:State=1,plrhealthless=21,plrhealthgreater=10:FlashLightRed=25,FlashLightGreen=0,FlashLightBlue=0,state=2
:State=1,plrhealthless=11,plrhealthgreater=0:FlashLightRed=0,FlashLightGreen=0,FlashLightBlue=0,state=2

:state=2:state=0


But, as the segments have shader, is not displayed. itself, only it moves with the player. but it is as close to what I need.

I suppose that if light can be moved with the player, also can with an object. I will continue investigating and if I succeed, I will share the code here. greetings
s4real
VIP Member
17
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 16th Jul 2015 21:23
Is this what you trying to do :- http://forum.thegamecreators.com/?m=forum_view&t=211964&b=21&msg=2562589#m2562589

You need to change the segments to use bond shader so the flashlight works with the segments.

Also you can use nomad mod to do this that is included with Black ice mod as well that gives further features.

Hope you get the results you after.

best s4real

Amd fx4100,6gb ram,geforce 450
arrojar entidad y que explote
9
Years of Service
User Offline
Joined: 3rd Jan 2015
Location:
Posted: 16th Jul 2015 21:56
S4real Hello, Thanks for your great work.
No, the torch, I know how to do it, what I need is that light follow an object that is not used with the player's hands. Basically as I show in the photo but with light. Thanks for your interest in helping.

Attachments

Login to view attachments
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 18th Jul 2015 02:42
You could do it in a sort of way if you dont mind the fact that the light wouldnt be constantly on but instead blinking on and off.

Have a string of lights rigged to a script where a player goes through a series of trigger zones turning them on and off in sequence so that a string of say 20 lights get turned on and off in such a way that only one is on at any given time and scripted so the one thats on is where u need it to be relative to the player. ie so that the lights always 3 tiles away?

smoke em if you got em
arrojar entidad y que explote
9
Years of Service
User Offline
Joined: 3rd Jan 2015
Location:
Posted: 18th Jul 2015 04:25
Hello Sinister Spoon, not have occurred to me that way, it might work, try using your idea, it costs nothing. Thanks for the idea. a greeting
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 19th Jul 2015 01:45
@Sinister Spoon
That's really a great idea using trigger zones and if one used
a light flicker script you might not even notice going from one
zone to another?

My games never have bugs. They just develop random features..
Lots and lots of random features...
arrojar entidad y que explote
9
Years of Service
User Offline
Joined: 3rd Jan 2015
Location:
Posted: 19th Jul 2015 23:47
I managed to do more or less functional. What makes this script, you turn on a light, only when a dynamic object passes through the firing zone otherwise remain off.

The downside is very unstable, if I put more of a dynamic light and more of a trigger stops working. I'm still working on it, if someone has a better idea. your opinion is welcome.

Entitywithinzone = command, works great only in the latest version update


Simply place the script in a main light and a trigger, and the trigger if used, put the name of each light.


Light script:

:state=0:state=1
:state=1,activated=0:state=2,lightoff
:state=2,activated=1:state=1,lighton


Trigger script:

:state=0,entitywithinzone=1:state=1
:state=1:activateifused=1,state=3

:state=3,anywithinzone=1:state=4
:state=3,anywithinzone=0:activateifused=0,state=0
:state=4:state=3
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 20th Jul 2015 21:52 Edited at: 20th Jul 2015 21:54
arrojar entidad
Actually after thinking about it, it is somewhat possible. Like S4real said, one can use an "entity" as a weapon to emit a flash.
Here I was able to get an entity to emit-flash (shootplr) and follow waypoints. It's very, very rough, but works. With a little scripting it should follow player easily around or have player
follow it.
best


My games never have bugs. They just develop random features..
Lots and lots of random features...
arrojar entidad y que explote
9
Years of Service
User Offline
Joined: 3rd Jan 2015
Location:
Posted: 20th Jul 2015 22:53 Edited at: 20th Jul 2015 22:54
WOW, it looks wonderful, I did not believe it was possible, I will investigate further with your help. An excellent work on their part, and a very good advice from S4real.

consultation, when you refer to an entity used as a weapon, refers only to scripting, with applications waypoint and shootplr? Or it means that the entity needs a gunspec file?I asked from my ignorance. It does what you did, is new to me.

Thanks for your time.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 21st Jul 2015 17:25
arrojar entidad
The first video shows an entity setup as a character and gave it
a firespot bone. Made a vweap (weapon) for it using no texture, scaled small and attached it. So now its just an NPC shooting at the player. Very limited though. It can follow waypoints and such
but you can't pick it up.
This second video shows a plain entity (dynamic) no changes using
only a script with the "emitflash" action. You can pick it up and carry it around, but the light seems to flicker too much. I cant
get it to speed up. What do you think?


My games never have bugs. They just develop random features..
Lots and lots of random features...
arrojar entidad y que explote
9
Years of Service
User Offline
Joined: 3rd Jan 2015
Location:
Posted: 22nd Jul 2015 01:12 Edited at: 22nd Jul 2015 02:43
ncmako

Great job, I was left me in this way, although the flash of light, is in excess and blinks a lot, compared to your work.

I was reading a lot of the manual, for now I can not find any other way to make the light does not blink too.



http://www.youtube.com/watch?v=geY67Ks90r8=580&h=320&rel=0
s4real
VIP Member
17
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 23rd Jul 2015 17:19
Added movable lights to black ice mod today where you can attach light to entity and much more.

This version will not be released just yet.

best s4real

Amd fx4100,6gb ram,geforce 450
Tectonic
17
Years of Service
User Offline
Joined: 5th Jun 2006
Location: Trinidad
Posted: 24th Jul 2015 04:51
@ s4real

that sounds awesome, looking forward to it!
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 24th Jul 2015 17:51
Nice S4real That would be great. Would solve a lot of problems
for some. Thank you
best

My games never have bugs. They just develop random features..
Lots and lots of random features...
Teabone
Valued Member
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 15th Aug 2015 07:28 Edited at: 15th Aug 2015 07:30
This is incredible. I had no idea this was possible in FPSC. It probably wont be in Game Guru till like 2017.

I attempted to do this many years ago in FPSC but it appeared very similar to what that emit command was doing. Where as it would flicker.

(Teabone)

Login to post a reply

Server time is: 2024-04-18 18:07:31
Your offset time is: 2024-04-18 18:07:31