Home » Renegade Discussions » Mod Forum » Few questions
Re: Few questions [message #408859 is a reply to message #408856] |
Fri, 30 October 2009 14:58 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma:
|
General (3 Stars) |
|
|
Hubba wrote on Fri, 30 October 2009 16:30 |
Yup that did the trick Thanks
---------------------------------------------------------
Question 4
I have another thing that i have been wondering on. I have a timer script that should just print 1 message after 1 second and then another after 10 second. This is just an example:
void Example::Created(GameObject *obj) {
Commands->Start_Timer(obj,this,1.0f,1);
Commands->Start_Timer(obj,this,10.0f,2);
}
void Example::Timer_Expired(GameObject *obj, int number) {
if(number == 1){
Console_Input("msg Message number1");
}
if(number == 2){
Console_Input("msg Message number2");
}
}
Now if i change character right after "message number1" then message number2 will never appear. This happends only when i change char not when buying a veh. Why?
|
When you change character, you are an entirely new GameObject *, so the script that was attached to you previously is destroyed, because the object that the script was attached to no longer exists.
When you purchase a vehicle, the script is attached to the vehicle, if you killed the vehicle then you would no longer get the message. The same principle can be applied to changing your character, it's kinda like you killed your character by getting a new one.
You can never permanently attach a script to a players character, unless they are gauranteed to never be killed.
You can however, keep re-attaching the same script to a player whenever they are created.
Hubba wrote on Fri, 30 October 2009 16:30 |
-----------------------------------------------------------------
Question 5
Then i have this veh script from wittebolx source (wittebolx has posted it here on renegadefourms)
;************************* Transport Helicopter Hummvee Drop ************************
; ****************************** Trajectory Transport
-1 Create_Object, 1, "XG_TransprtBone", 0, 0, 0, 0
-1 Play_Animation, 1, "XG_TransprtBone.XG_HD_TTraj", 1
; ****************************** Transport
-1 Create_Real_Object, 2, "CnC_GDI_Transport", 1, "BN_Trajectory"
-1 Attach_Script, 2, "KAK_Prevent_Destruction_Until_Entered"
-1 Set_Primary, 2
-1 Attach_to_Bone, 2, 1, "BN_Trajectory"
-1 Play_Animation, 2, "v_GDI_trnspt.XG_HD_Transport",1
-700 destroy_object, 2
; ****************************** Trajectory Nod_Light_Tank
-1 Create_Object, 3, "XG_HD_HTraj", 0, 0, 0, 0
-1 Play_Animation, 3, "XG_HD_HTraj.XG_HD_HTraj", 1
; ****************************** Nod_Light_Tank
-1 Create_Real_Object, 4, "CnC_Nod_Buggy", 3, "BN_Trajectory"
-1 Attach_Script, 4, "M02_Player_Vehicle", "0"
-1 Attach_Script, 4, "KAK_Prevent_Destruction_Until_Entered"
-1 Attach_to_Bone, 4, 3, "BN_Trajectory"
-437 Attach_to_Bone, 4, -1, "BN_Trajectory"
-437 Move_Slot, 7, 4
; ****************************** Harness
-1 Create_Object, 6, "XG_HD_Harness", 0, 0, 0, 0
-1 Play_Animation, 6, "XG_HD_Harness.XG_HD_Harness", 0
; ****************************** Primary Destroyed
1000000 Destroy_Object, 1
1000000 Destroy_Object, 2
1000000 Destroy_Object, 3
1000000 Destroy_Object, 4
1000000 Destroy_Object, 5
1000000 Destroy_Object, 6
I know what the script does but i don't really get the numbers and how its build up. For example 1000000 Destroy_Object, 6 I know that it destroy the object 6 but what does the number 1000000 do? So if someone could explain in short what the numbers and stuff do i would be happy
|
I think it's a timer, I never really delved too far into cinematic files, I just gleaned what I needed to know to make them work.
You can call these text files with "test_cinematic".
|
|
|
|
|
Few questions
By: Hubba on Thu, 29 October 2009 22:10
|
|
|
Re: Few questions
|
|
|
Re: Few questions
By: reborn on Fri, 30 October 2009 03:29
|
|
|
Re: Few questions
By: Hubba on Fri, 30 October 2009 09:22
|
|
|
Re: Few questions
By: reborn on Fri, 30 October 2009 12:48
|
|
|
Re: Few questions
By: Hubba on Fri, 30 October 2009 14:30
|
|
|
Re: Few questions
By: reborn on Fri, 30 October 2009 14:58
|
|
|
Re: Few questions
By: Hubba on Sat, 31 October 2009 04:21
|
|
|
Re: Few questions
By: cAmpa on Sat, 31 October 2009 04:41
|
|
|
Re: Few questions
By: Hubba on Sat, 31 October 2009 05:56
|
|
|
Re: Few questions
By: cAmpa on Sat, 31 October 2009 06:43
|
|
|
Re: Few questions
By: Hubba on Sat, 31 October 2009 12:10
|
|
|
Re: Few questions
By: Hubba on Thu, 05 November 2009 21:45
|
|
|
Re: Few questions
By: reborn on Thu, 05 November 2009 22:54
|
|
|
Re: Few questions
By: Hubba on Fri, 06 November 2009 09:11
|
|
|
Re: Few questions
|
|
|
Re: Few questions
By: Hubba on Fri, 06 November 2009 13:46
|
|
|
Re: Few questions
By: reborn on Sat, 07 November 2009 01:00
|
|
|
Re: Few questions
By: Hubba on Sat, 07 November 2009 03:05
|
|
|
Re: Few questions
By: raven on Sat, 07 November 2009 13:47
|
Goto Forum:
Current Time: Sun Dec 15 08:26:21 MST 2024
Total time taken to generate the page: 0.00975 seconds
|