Swoorup Posted September 3, 2011 Share Posted September 3, 2011 I am trying to get an actor in my car but this crashes everytime, Whats wrong? I commented it out just for no errors //if //0443: player $PLAYER_CHAR in_a_car //then//00DA: [email protected] = player $PLAYER_CHAR car//036A: put_actor [email protected] in_car [email protected]//end Link to comment Share on other sites More sharing options...
DaRk_St0rM Posted September 3, 2011 Share Posted September 3, 2011 Post the entire code. This part seems to be correct. Link to comment Share on other sites More sharing options...
Swoorup Posted September 3, 2011 Author Share Posted September 3, 2011 (edited) {$VERSION 2.1.1000}{$CLEO .cs}//-------------MAIN---------------03A4: name_thread 'Ashwin' 032B: [email protected] = create_weapon_pickup #PYTHON ammo 15 9999 at 239.2362 -1279.4069 11.0712/////////Put your code here////////////:labelwait 0if 0214: pickup [email protected] picked_up jf @label0109: player $PLAYER_CHAR money += 99999:actoragainwait 2000009A: [email protected] = create_actor 4 #HFYMD at 239.7125 -1287.2311 10.9015model.Load(#uzi)038B: load_requested_models :weaponloadwait 0if 0248: model #uzi available jf @weaponload01B2: give_actor [email protected] weapon 23 ammo 9999 // Load the weapon model before using this01D2: actor [email protected] follow_player $PLAYER_CHAR 03BC: [email protected] = create_sphere 239.7125 -1287.2311 10.9015 30187: [email protected] = create_marker_above_actor [email protected]:stupidloop//if //0443: player $PLAYER_CHAR in_a_car //then//00DA: [email protected] = player $PLAYER_CHAR car//036A: put_actor [email protected] in_car [email protected]//endwait 0if 0118: actor [email protected] deadjf @stupidloopwait 2000034F: destroy_actor_with_fade [email protected] // The actor fades away like a ghost jump @actoragain 05DC: end_custom_thread No, the actor spawns and when i get in car, VC crashes Do cleo changes some information in normal savefiles? How to not save cleo script in save file? EDIT:Treat the comment below stupidloop label as code Edited September 3, 2011 by Swoorup Link to comment Share on other sites More sharing options...
xNCx Posted September 3, 2011 Share Posted September 3, 2011 Maybe this could help. I think that 036A: put_actor [email protected] in_car [email protected] puts the actor in a car as a driver and I guess the player IS the driver, which means, the player should... disappear ;o. And then boom! Crash. And I don't know if you can use a local variable at this time. Try a $ global variable for the actor. Link to comment Share on other sites More sharing options...
Swoorup Posted September 3, 2011 Author Share Posted September 3, 2011 VC cleo is really annyoing. IDK about that but IF <condition><statement>else<statement>end This structure does not work. Many things do no work So i Have to stick with if.....jf structure Link to comment Share on other sites More sharing options...
Wesser Posted September 3, 2011 Share Posted September 3, 2011 Have you ever thought about your ignorance if nothing works? Don't you? What's wrong with that most common high level human-readable structure? 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
Ify24 Posted September 3, 2011 Share Posted September 3, 2011 I am trying to get an actor in my car but this crashes everytime, Whats wrong?I commented it out just for no errors //if //0443: player $PLAYER_CHAR in_a_car //then//00DA: [email protected] = player $PLAYER_CHAR car//036A: put_actor [email protected] in_car [email protected]//end So actor must be in car with PLAYER_CHAR ?? You can tie actor to player and actor will follow you (player) and also make marker above car and disable if actor and PLAyER_ACTOR are in car Link to comment Share on other sites More sharing options...
Swoorup Posted September 3, 2011 Author Share Posted September 3, 2011 (edited) I am sorry if i seem lazy here. But I am really not playing around with you guys. I tried that structure for destroying or fading away my actor but it caused crashes always. Also I could not find any good VC tutorials concerning about that IF...THEN....ELSE structure. It works for SA as people havenot complained anything about it but for VC cleo I really am confused Most of the tutorial spaceenstein made for 'Create a mission' uses label and jump if false structure EDIT:@Ify24 I already made the actor to follow me around but the thing is he just does not sit in my car, and i dont know how else to bring him in the car Edited September 3, 2011 by Swoorup Link to comment Share on other sites More sharing options...
Ify24 Posted September 3, 2011 Share Posted September 3, 2011 (edited) EDIT:@Ify24I already made the actor to follow me around but the thing is he just does not sit in my car, and i dont know how else to bring him in the car You are not using opcode tie actor to player... your are using that actor follow player : 01D2: actor [email protected] follow_player $PLAYER_CHAR Delete that opcode and put this opcode to TIE ACTOR TO PLAYER... 01DF: tie_actor $723 to_player $PLAYER_CHAR And by the way I think that it will be better that you load models that you are useing... and unload of course Edited September 3, 2011 by Ify24 Link to comment Share on other sites More sharing options...
spaceeinstein Posted September 3, 2011 Share Posted September 3, 2011 (edited) ...when i get in car, VC crashes... Let's see what happens when you enter the car, line by line. if0443: player $PLAYER_CHAR in_a_car Ok, if player is in car, what happens? then00DA: [email protected] = player $PLAYER_CHAR car Ok, then you want the car to be recognized by the code. Nothing wrong so far. 036A: put_actor [email protected] in_car [email protected] What's this? Usually if player is in car, player is the driver. 036A puts the actor in the driver seat, which is already occupied by you! Ify's solution to the actor not entering the car with you looks like it would work. If it does, you can remove the commented code. The game does this job multiple times, so please check the original game script if you don't know how to tie an actor. If-then-else is a near universal expression that any English-speaking person can use. There's no need for a tutorial just for this specific game. If-then-else isn't needed if you already know how if-jf works. Edited September 3, 2011 by spaceeinstein Link to comment Share on other sites More sharing options...
Ify24 Posted September 3, 2011 Share Posted September 3, 2011 Wait, but he can use opcode: 01DF: tie_actor $723 to_player $PLAYER_CHAR And then I think that if player enter the car, actor should enter in the car too. And he can get marker above car and repeat until actor.incar ( and player and actor) and then disaable marker... so if actor ( Player and actor) needs to be in car this is solution.... Link to comment Share on other sites More sharing options...
Swoorup Posted September 5, 2011 Author Share Posted September 5, 2011 both of you sir thank you. Tie actor worked like a charm!!! 04F5: unknown_actor $723 kiss_player #spaceeinstein & #Ify24 Found it in scm update Link to comment Share on other sites More sharing options...
Ashwin.Star Posted September 8, 2011 Share Posted September 8, 2011 is this cleo script is working fine ??? i doubt because it have many problems, Link to comment Share on other sites More sharing options...
Swoorup Posted September 8, 2011 Author Share Posted September 8, 2011 I tried the actor to kill me by using if damage opcode and IF....THEN...END but it does not work Link to comment Share on other sites More sharing options...
Ify24 Posted September 8, 2011 Share Posted September 8, 2011 Actor.WeaponAccuracy() and use opcode search... Link to comment Share on other sites More sharing options...
Swoorup Posted September 8, 2011 Author Share Posted September 8, 2011 I used tie actor to follow me. Then I used the IF structure given that if the actor is damaged by me then he should kill me. He just raises his gun for a flash to me but wont kill me? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now