Page 2 of 4

Posted: Tue May 10, 2005 6:59 pm
by Bjarne BZR
Rookie One.pl {sfx} wrote:Local.camera_trigger in one thread and local.camera_trigger in the other are not the same thing.
Damn, I totally missed that :)

Yes, replace local with level.

Posted: Tue May 10, 2005 9:28 pm
by agentmad007
Thanks It worked :)

Just some precisions please :

1)Why should I write level instead of local ?

2)Can whe make this trigger camera_use active , other way than pressing Use key? If player is touching the trigger for instance , that would fit better my desires.

Thanks :D

Posted: Tue May 10, 2005 9:33 pm
by agentmad007
Just read in g_allclasses:

Code: Select all

doTouch( Entity touchingEntity )


sent to entity when touched.

I think it should work.I ll give feedbacks

edit: It says Dotouch applied to Nil listener, and when i press use key , the cam work though ?????weird.

here is the code I've used.

Code: Select all


pilot1_cam:

local.player = parm.other 
level.camera_trigger doTouch local.player

end


Posted: Tue May 10, 2005 9:42 pm
by wacko
:oops: I dont get it at all. Hopefully its just me thinking into the wrong direction...
Anyway, if someone could give me a little demo map so I could see it in action, I'd really appreciate this (and would have a new piece for the recycling bin :wink: )

Posted: Tue May 10, 2005 10:41 pm
by agentmad007
Sorry again with my questions:


How do you do to switch off the camera view? remove comand keep saying in console "applied to Nil listener"

Could i script teleport, moving objects or whatever whe can do with a normal trigger_use or multiple , using a trigger camera_Use.

Wanna move the player to a camera , to let him watch , what i want to.(moving objects and player beaming down especially).

Ps: Sorry wacko , i would gladly do a .map but i am lost..hehe

thanks

Posted: Tue May 10, 2005 11:02 pm
by Elgan
try cueplayer


cueplayer local.player

Posted: Tue May 10, 2005 11:16 pm
by agentmad007

Code: Select all


pilot1_cam:

local.player = parm.other 
level.camera_trigger doUse local.player
wait 5
level.camera_trigger cueplayer local.player

end

applied to Nil listener, This NIL grrrrrrrrrrrrrrrrrrrrrrrrrrrr

Posted: Tue May 10, 2005 11:42 pm
by Bjarne BZR
agentmad007 wrote:1)Why should I write level instead of local ?
level and local are predefined objects that you can insert data into.
The difference is that local only lives inside the function ( between function_name: and the following end ), but level lives from the time the level starts until it ends.
Read detalis here: http://gronnevik.se/rjukan/index.php?n= ... ptLanguage ( under the section named "predefined objects" )
agentmad007 wrote:2)Can whe make this trigger camera_use active , other way than pressing Use key? If player is touching the trigger for instance , that would fit better my desires.
Yes, I guess you just use a trigger_multiple instead of a trigger_use.

Posted: Wed May 11, 2005 1:00 am
by Elgan

Code: Select all


pilot1_cam:

local.player = parm.other 
level.camera_trigger doUse local.player
wait 5
cueplayer local.player

end


Posted: Wed May 11, 2005 1:09 am
by agentmad007
Let's say my trigger_use is targetnamed "my_trigger".

This trigger_use, once activated , teleport the player somewhere with some animated objects.I would like the camera to be set , so the player could see what happen.

shall i write the thing like that :


Code: Select all


level waittill prespawn

local.tgname = "cam_pilot1" + randomint 1000 
local.camera = spawn Camera targetname local.tgname 
local.camera.origin = (616 4400 2648 ) 
$my_trigger target local.tgname

main:

my_thread:

$my_trigger waittill trigger 
local.player = parm.other 

$my_trigger doUse local.player

wait .5

local.player tele XXXXXX

$my_object moveDown XXXXXX
$my_object waitmove

$my_trigger cueplayer local.player//That doesnt work though , but it will be nice to answer to everyone how to deactive the camera_view

end


Is that possible ? Cause i cant get it to work.

thank you for the HELP :D

Posted: Wed May 11, 2005 1:45 am
by Elgan
cueplayer local.player

not $my_trigger cueplayer local.player

sud work if not i got some mroe sugestions

Posted: Wed May 11, 2005 10:38 am
by agentmad007
Elgan wrote:

Code: Select all


pilot1_cam:

local.player = parm.other 
level.camera_trigger doUse local.player
wait 5
cueplayer local.player

end

Sorry Elgan , Have not seen your post when i replied.It doesnt work.Nothing in console to Help.The player is still glued to the cam.

EDIT:

List of what i ve tried out:

cueplayer( [ Float switchTime ] )
cueplayer local.player
cuecamera local.player
cuecamera local.tgname

end of Edit

Posted: Wed May 11, 2005 11:25 am
by Elgan
try doing

$my_trigger doUse local.player

again


stopwatchingactor - neevr used that? can u amke a players cma watcha actor?

watchactor - hmm i guess so

u cud make the cam watch the player.hehe

Posted: Wed May 11, 2005 11:40 am
by agentmad007
stopwatchingactor( Entity actor_to_stop_watching )
Makes the player's camera stop watching the specified actor.

So to use that comand, it need first the player to be set viewing an actor , wich is not the case currently....
Or what i shall i stop watching to ?

......

Btw i also tried

Code: Select all

local.player cut , as mentioned JV at start, the console said applied to NIL.

Posted: Wed May 11, 2005 11:48 am
by Elgan
then are u sure your local.player was filled?