Producing packets and menus HELP NEEDED

Started by kon, May 15, 2015, 10:54:03 AM

Previous topic - Next topic

kon

I want to create something like CN, but couldn't find functions/Consts for:
sending packets to units
checking amount of units connected in network
making menus( if you click on the crpl core, down a "disarm, destroy, etc. Menu option )

Please help me  ;)
I want to re-create in my map the CW2's rift unit or what is it's name. The receiving is ok but can't send packets :(

Tyler21

Quote from: kon on May 15, 2015, 10:54:03 AM
I want to create something like CN, but couldn't find functions/Consts for:
sending packets to units
checking amount of units connected in network
making menus( if you click on the crpl core, down a "disarm, destroy, etc. Menu option )

Please help me  ;)
I want to re-create in my map the CW2's rift unit or what is it's name. The receiving is ok but can't send packets :(

1) As far as I know there is no way to modify the packet generating / sending algorithm.
2) Counting the number of units that are connected is not possible directly. However you can create a complex script that checks every unit whether it received new packets in the last x frames (by comparing the ammo x frames before and now). This usually means that the unit is connected although there are lot of exceptions (for example: unit is at full ammo and is not firing).
3) This is possible though sligthly complicated. You have to create cores (buttons or whatever you might like) that are only activated (visible, clickable) when the player selects the unit and are set to a certain screen position by using SetScreenMode instead of map coordinates.
"Enjoyment appears at the boundary between boredom and anxiety, when the challenges are just balanced with the person's capacity to act."
― Mihaly Csikszentmihalyi

Check my collection of the 30 most difficult and challenging maps in Colonial Space!

kon

1, Not possible :O :(
2, If 1 is not possible i don't need 2
3, Is it possible with ShowText to show multiple texts at the same time?
+ Question
How to make sniper or beam etc. Effects?

Tyler21

#3
Quote from: kon on May 15, 2015, 12:24:06 PM
1, Not possible :O :(
2, If 1 is not possible i don't need 2
3, Is it possible with ShowText to show multiple texts at the same time?
+ Question
How to make sniper or beam etc. Effects?

There is no such command as 'ShowText'.
If you meant the SetText command, you can set only one string for each crplcore.
However, you can break lines and merge multiple strings into a single string so there is relatively big freedom in using SetText.
You can create as many different texts as you wish if you create multiple crpl cores.

For the effects check Telanir's EasyCRPL, look for 'pre-built beam'. The sniper can be programmed in a similar way.
"Enjoyment appears at the boundary between boredom and anxiety, when the challenges are just balanced with the person's capacity to act."
― Mihaly Csikszentmihalyi

Check my collection of the 30 most difficult and challenging maps in Colonial Space!

kon

1,Thanks, yes I meant the SetText command. I just don't use it, so I forgot it's name, but I remember that I had issues when trying to show multiple of them, so thanks!
+ thanks

pawel345

As for the packets, it's not possible to send real packets but you can change the values for ammo and so on so it's possible to create CRPL cores that will behave like packets. It's quite complex but I think someone have done it.